1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
|
diff -r 06549f98901b ipc/chromium/src/base/debug_util_posix.cc
--- ipc/chromium/src/base/debug_util_posix.cc Fri Aug 02 14:36:52 2013 +0000
+++ ipc/chromium/src/base/debug_util_posix.cc Fri Aug 02 14:42:20 2013 +0000
@@ -5,7 +5,7 @@
#include "build/build_config.h"
#include "base/debug_util.h"
-#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
+#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && defined(__GLIBC__))
#include <errno.h>
#include <fcntl.h>
diff -r 06549f98901b ipc/chromium/src/base/file_util.h
--- ipc/chromium/src/base/file_util.h Fri Aug 02 14:36:52 2013 +0000
+++ ipc/chromium/src/base/file_util.h Fri Aug 02 14:42:20 2013 +0000
@@ -16,7 +16,11 @@
#include <sys/stat.h>
#elif defined(OS_POSIX)
#include <sys/types.h>
+#ifndef __GLIBC__
+#define NO_FTS
+#else
#include <fts.h>
+#endif
#include <sys/stat.h>
#endif
@@ -466,7 +470,7 @@
#if defined(OS_WIN)
WIN32_FIND_DATA find_data_;
HANDLE find_handle_;
-#elif defined(ANDROID)
+#elif defined(NO_FTS)
void *fts_;
#elif defined(OS_POSIX)
FTS* fts_;
diff -r 06549f98901b ipc/chromium/src/base/file_util_posix.cc
--- ipc/chromium/src/base/file_util_posix.cc Fri Aug 02 14:36:52 2013 +0000
+++ ipc/chromium/src/base/file_util_posix.cc Fri Aug 02 14:42:20 2013 +0000
@@ -8,13 +8,16 @@
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
-#ifndef ANDROID
+#ifndef __GLIBC__
+#define NO_FTS
+#endif
+#ifndef NO_FTS
#include <fts.h>
#endif
#include <libgen.h>
#include <stdio.h>
#include <string.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/mman.h>
#define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures
#include <sys/stat.h>
@@ -121,7 +124,7 @@
if (!recursive)
return (rmdir(path_str) == 0);
-#ifdef ANDROID
+#ifdef NO_FTS
// XXX Need ftsless impl for bionic
return false;
#else
@@ -194,7 +197,7 @@
return false;
}
-#ifdef ANDROID
+#ifdef NO_FTS
// XXX Need ftsless impl for bionic
return false;
#else
@@ -613,7 +616,7 @@
}
FileEnumerator::~FileEnumerator() {
-#ifndef ANDROID
+#ifndef NO_FTS
if (fts_)
fts_close(fts_);
#endif
@@ -625,7 +628,7 @@
if (!is_in_find_op_)
return;
-#ifndef ANDROID
+#ifndef NO_FTS
memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat));
info->filename.assign(fts_ent_->fts_name);
#endif
@@ -636,7 +639,7 @@
// large directories with many files this can be quite deep.
// TODO(erikkay) - get rid of this recursive pattern
FilePath FileEnumerator::Next() {
-#ifdef ANDROID
+#ifdef NO_FTS
return FilePath();
#else
if (!is_in_find_op_) {
diff -r 06549f98901b ipc/chromium/src/base/time_posix.cc
--- ipc/chromium/src/base/time_posix.cc Fri Aug 02 14:36:52 2013 +0000
+++ ipc/chromium/src/base/time_posix.cc Fri Aug 02 14:42:20 2013 +0000
@@ -65,8 +65,10 @@
timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this
timestruct.tm_yday = 0; // mktime/timegm ignore this
timestruct.tm_isdst = -1; // attempt to figure it out
+#ifdef __GLIBC__
timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore
timestruct.tm_zone = NULL; // not a POSIX field, so mktime/timegm ignore
+#endif
time_t seconds;
#ifdef ANDROID
diff -r 06549f98901b media/libcubeb/src/Makefile.in
--- media/libcubeb/src/Makefile.in Fri Aug 02 14:36:52 2013 +0000
+++ media/libcubeb/src/Makefile.in Fri Aug 02 14:42:20 2013 +0000
@@ -53,7 +53,7 @@
DEFINES += -DUSE_SNDIO
endif
-ifdef MOZ_ALSA
+ifdef MOZ_ALSA_LIBS
CSRCS += \
cubeb_alsa.c \
$(NULL)
diff -r 06549f98901b media/libcubeb/src/cubeb_alsa.c
--- media/libcubeb/src/cubeb_alsa.c Fri Aug 02 14:36:52 2013 +0000
+++ media/libcubeb/src/cubeb_alsa.c Fri Aug 02 14:42:20 2013 +0000
@@ -6,6 +6,7 @@
*/
#undef NDEBUG
#define _BSD_SOURCE
+#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 500
#include <pthread.h>
#include <sys/time.h>
diff -r 06549f98901b media/mtransport/third_party/nICEr/src/stun/addrs.c
--- media/mtransport/third_party/nICEr/src/stun/addrs.c Fri Aug 02 14:36:52 2013 +0000
+++ media/mtransport/third_party/nICEr/src/stun/addrs.c Fri Aug 02 14:42:20 2013 +0000
@@ -63,7 +63,7 @@
#include <net/if_dl.h>
#include <net/if_types.h>
#include <sys/sockio.h>
-#else
+#elif 0
#include <linux/if.h>
#endif
#include <net/route.h>
diff -r 06549f98901b media/webrtc/trunk/testing/gtest/src/gtest.cc
--- media/webrtc/trunk/testing/gtest/src/gtest.cc Fri Aug 02 14:36:52 2013 +0000
+++ media/webrtc/trunk/testing/gtest/src/gtest.cc Fri Aug 02 14:42:20 2013 +0000
@@ -48,6 +48,8 @@
#include <sstream>
#include <vector>
+#include <sys/socket.h>
+
#if GTEST_OS_LINUX
// TODO(kenton@google.com): Use autoconf to detect availability of
diff -r 06549f98901b media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc
--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc Fri Aug 02 14:36:52 2013 +0000
+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc Fri Aug 02 14:42:20 2013 +0000
@@ -38,7 +38,7 @@
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Available number of cores:%d", number_of_cores_);
-#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK)
+#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) && defined(__GLIBC__)
number_of_cores_ = get_nprocs();
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Available number of cores:%d", number_of_cores_);
diff -r 06549f98901b media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
--- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc Fri Aug 02 14:36:52 2013 +0000
+++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc Fri Aug 02 14:42:20 2013 +0000
@@ -264,7 +264,7 @@
// CPU_ZERO and CPU_SET are not available in NDK r7, so disable
// SetAffinity on Android for now.
-#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK)))
+#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK)) && defined(__GLIBC__))
bool ThreadPosix::SetAffinity(const int* processor_numbers,
const unsigned int amount_of_processors) {
if (!processor_numbers || (amount_of_processors == 0)) {
diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_bsd_addr.c
--- netwerk/sctp/src/netinet/sctp_bsd_addr.c Fri Aug 02 14:36:52 2013 +0000
+++ netwerk/sctp/src/netinet/sctp_bsd_addr.c Fri Aug 02 14:42:20 2013 +0000
@@ -49,11 +49,9 @@
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_indata.h>
#if !defined(__Userspace_os_Windows)
+#include <unistd.h>
#if defined(ANDROID)
-#include <unistd.h>
#include <ifaddrs-android-ext.h>
-#else
-#include <sys/unistd.h>
#endif
#endif
diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_os_userspace.h
--- netwerk/sctp/src/netinet/sctp_os_userspace.h Fri Aug 02 14:36:52 2013 +0000
+++ netwerk/sctp/src/netinet/sctp_os_userspace.h Fri Aug 02 14:42:20 2013 +0000
@@ -381,9 +381,8 @@
};
#else /* !defined(Userspace_os_Windows) */
-#include <sys/cdefs.h> /* needed? added from old __FreeBSD__ */
#include <sys/socket.h>
-#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) || defined(__Userspace_os_NetBSD)
+#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) || defined(__Userspace_os_NetBSD) || 1
#include <pthread.h>
#endif
typedef pthread_mutex_t userland_mutex_t;
@@ -408,7 +407,7 @@
/* #include <sys/param.h> in FreeBSD defines MSIZE */
/* #include <sys/ktr.h> */
/* #include <sys/systm.h> */
-#if defined(__Userspace_os_Windows)
+#if defined(__Userspace_os_Windows) || 1
#include <user_queue.h>
#else
#include <sys/queue.h>
diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_pcb.c
--- netwerk/sctp/src/netinet/sctp_pcb.c Fri Aug 02 14:36:52 2013 +0000
+++ netwerk/sctp/src/netinet/sctp_pcb.c Fri Aug 02 14:42:20 2013 +0000
@@ -30,6 +30,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#define _BSD_SOURCE /* for IPPORT_RESERVED */
+
#ifdef __FreeBSD__
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 246687 2013-02-11 21:02:49Z tuexen $");
@@ -69,11 +71,10 @@
#endif
#if defined(__Userspace__)
#if !defined(__Userspace_os_Windows)
+#include <netdb.h>
+#include <unistd.h>
#if defined(ANDROID)
-#include <unistd.h>
#include <ifaddrs-android-ext.h>
-#else
-#include <sys/unistd.h>
#endif
#endif
#include <user_socketvar.h>
diff -r 06549f98901b netwerk/sctp/src/user_queue.h
--- netwerk/sctp/src/user_queue.h Fri Aug 02 14:36:52 2013 +0000
+++ netwerk/sctp/src/user_queue.h Fri Aug 02 14:42:20 2013 +0000
@@ -31,9 +31,6 @@
#ifndef _USER_QUEUE_H_
#define _USER_QUEUE_H_
-#if !defined (__Userspace_os_Windows)
-#include <sys/cdefs.h>
-#endif
/*
* This file defines four types of data structures: singly-linked lists,
* singly-linked tail queues, lists and tail queues.
diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
--- toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc Fri Aug 02 14:42:20 2013 +0000
@@ -46,6 +46,9 @@
#include <sys/stat.h>
#include <unistd.h>
+// [Gregor] POSIX specifies dirname/basename as in libgen.h
+#include <libgen.h>
+
#include <iostream>
#include <set>
#include <string>
diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
--- toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc Fri Aug 02 14:42:20 2013 +0000
@@ -41,6 +41,10 @@
#include "common/using_std_string.h"
+#ifndef N_UNDF
+#define N_UNDF 0
+#endif
+
using std::vector;
namespace google_breakpad {
diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
--- toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h Fri Aug 02 14:42:20 2013 +0000
@@ -53,7 +53,7 @@
#include <config.h>
#endif
-#ifdef HAVE_A_OUT_H
+#if 0
#include <a.out.h>
#endif
#ifdef HAVE_MACH_O_NLIST_H
diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
--- toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h Fri Aug 02 14:42:20 2013 +0000
@@ -2813,7 +2813,7 @@
LSS_INLINE _syscall6(void*, mmap, void*, s,
size_t, l, int, p,
int, f, int, d,
- __off64_t, o)
+ off_t, o)
LSS_INLINE _syscall4(int, newfstatat, int, d,
const char *, p,
diff -r 06549f98901b toolkit/library/Makefile.in
--- toolkit/library/Makefile.in Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/library/Makefile.in Fri Aug 02 14:42:20 2013 +0000
@@ -427,7 +427,7 @@
ifdef MOZ_CUBEB
-ifdef MOZ_ALSA
+ifdef MOZ_ALSA_LIBS
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
endif
ifdef MOZ_PULSEAUDIO
diff -r 06549f98901b toolkit/mozapps/update/common/updatedefines.h
--- toolkit/mozapps/update/common/updatedefines.h Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/mozapps/update/common/updatedefines.h Fri Aug 02 14:42:20 2013 +0000
@@ -106,8 +106,10 @@
#ifdef SOLARIS
# include <sys/stat.h>
#else
+#if !defined(__linux__) || defined(__GLIBC__)
# include <fts.h>
#endif
+#endif
# include <dirent.h>
#ifdef XP_MACOSX
diff -r 06549f98901b toolkit/mozapps/update/updater/updater.cpp
--- toolkit/mozapps/update/updater/updater.cpp Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/mozapps/update/updater/updater.cpp Fri Aug 02 14:42:20 2013 +0000
@@ -3369,6 +3369,7 @@
int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
{
int rv = OK;
+#if !defined(__linux__) || defined(__GLIBC__)
FTS *ftsdir;
FTSENT *ftsdirEntry;
NS_tchar searchpath[MAXPATHLEN];
@@ -3471,6 +3472,7 @@
}
fts_close(ftsdir);
+#endif
return rv;
}
diff -r 06549f98901b toolkit/xre/nsSigHandlers.cpp
--- toolkit/xre/nsSigHandlers.cpp Fri Aug 02 14:36:52 2013 +0000
+++ toolkit/xre/nsSigHandlers.cpp Fri Aug 02 14:42:20 2013 +0000
@@ -15,6 +15,7 @@
#include <signal.h>
#include <stdio.h>
#include <string.h>
+#include <sys/types.h>
#include "prthread.h"
#include "plstr.h"
#include "prenv.h"
@@ -152,7 +153,7 @@
status->__invalid = status->__denorm = status->__zdiv = status->__ovrfl = status->__undfl =
status->__precis = status->__stkflt = status->__errsumm = 0;
- __uint32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr;
+ u_int32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr;
*mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
*mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
#endif
@@ -172,13 +173,13 @@
*sw &= ~FPU_STATUS_FLAGS;
#endif
#if defined(__amd64__)
- __uint16_t *cw = &uc->uc_mcontext.fpregs->cwd;
+ u_int16_t *cw = &uc->uc_mcontext.fpregs->cwd;
*cw |= FPU_EXCEPTION_MASK;
- __uint16_t *sw = &uc->uc_mcontext.fpregs->swd;
+ u_int16_t *sw = &uc->uc_mcontext.fpregs->swd;
*sw &= ~FPU_STATUS_FLAGS;
- __uint32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr;
+ u_int32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr;
*mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
*mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
#endif
@@ -187,24 +188,24 @@
ucontext_t *uc = (ucontext_t *)context;
#if defined(__i386)
- uint32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0];
+ u_int32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0];
*cw |= FPU_EXCEPTION_MASK;
- uint32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1];
+ u_int32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1];
*sw &= ~FPU_STATUS_FLAGS;
/* address of the instruction that caused the exception */
- uint32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3];
+ u_int32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3];
uc->uc_mcontext.gregs[REG_PC] = *ip;
#endif
#if defined(__amd64__)
- uint16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw;
+ u_int16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw;
*cw |= FPU_EXCEPTION_MASK;
- uint16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw;
+ u_int16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw;
*sw &= ~FPU_STATUS_FLAGS;
- uint32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr;
+ u_int32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr;
*mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
*mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
#endif
diff -r 06549f98901b tools/profiler/platform-linux.cc
--- tools/profiler/platform-linux.cc Fri Aug 02 14:36:52 2013 +0000
+++ tools/profiler/platform-linux.cc Fri Aug 02 14:42:20 2013 +0000
@@ -66,7 +66,7 @@
#define SIGNAL_SAVE_PROFILE SIGUSR2
-#if defined(__GLIBC__)
+#if 1
// glibc doesn't implement gettid(2).
#include <sys/syscall.h>
pid_t gettid()
@@ -181,7 +181,7 @@
// Convert ms to us and subtract 100 us to compensate delays
// occuring during signal delivery.
// TODO measure and confirm this.
- const useconds_t interval = sampler_->interval_ * 1000 - 100;
+ const unsigned long interval = sampler_->interval_ * 1000 - 100;
//int result = usleep(interval);
usleep(interval);
}
diff -r 06549f98901b tools/profiler/platform.h
--- tools/profiler/platform.h Fri Aug 02 14:36:52 2013 +0000
+++ tools/profiler/platform.h Fri Aug 02 14:42:20 2013 +0000
@@ -29,6 +29,8 @@
#ifndef TOOLS_PLATFORM_H_
#define TOOLS_PLATFORM_H_
+#include <sys/types.h>
+
// Uncomment this line to force desktop logging
//#define SPS_FORCE_LOG
diff -r 06549f98901b tools/profiler/shared-libraries-linux.cc
--- tools/profiler/shared-libraries-linux.cc Fri Aug 02 14:36:52 2013 +0000
+++ tools/profiler/shared-libraries-linux.cc Fri Aug 02 14:42:20 2013 +0000
@@ -14,7 +14,7 @@
#include "platform.h"
#include "shared-libraries.h"
-#ifndef __GLIBC__
+#if 0
/* a crapy version of getline, because it's not included in bionic */
static ssize_t getline(char **lineptr, size_t *n, FILE *stream)
{
@@ -35,7 +35,9 @@
#ifdef ANDROID
#include "ElfLoader.h" // dl_phdr_info
#else
+extern "C" { // [Gregor] musl bug
#include <link.h> // dl_phdr_info
+}
#endif
#include <features.h>
#include <dlfcn.h>
|