Page MenuHomePhabricator

Fix building DynamicLibrary.cpp with musl libc

Authored by dim on Jun 4 2017, 1:37 PM.



The workaround added in rL301240 for stderr/out/in symbols being both
macros and globals is only necessary for glibc, and it does not compile
with musl libc. Alpine Linux has had the following fix for it:

Adapt the fix in our for Unix.

Diff Detail


Event Timeline

dim created this revision.Jun 4 2017, 1:37 PM
krytarowski accepted this revision.Jun 4 2017, 1:47 PM
/* Standard streams.  */
extern struct _IO_FILE *stdin;          /* Standard input stream.  */
extern struct _IO_FILE *stdout;         /* Standard output stream.  */
extern struct _IO_FILE *stderr;         /* Standard error output stream.  */
/* C89/C99 say they're macros.  Make them happy.  */
#define stdin stdin
#define stdout stdout
#define stderr stderr


This revision is now accepted and ready to land.Jun 4 2017, 1:47 PM
This revision was automatically updated to reflect the committed changes.
tpimh added a subscriber: tpimh.Jun 5 2017, 6:31 AM