diff options
author | Björn Gustavsson <[email protected]> | 2016-03-15 12:51:50 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-15 13:15:58 +0100 |
commit | 99b8c76f52558a1522f8ecc9efef7b3633656c8a (patch) | |
tree | fdd4dafc7f124956f4c120e52344913e41b2593b /erts/etc | |
parent | 12c3609f15dbe367684ecb506b61f07c15205c51 (diff) | |
download | otp-99b8c76f52558a1522f8ecc9efef7b3633656c8a.tar.gz otp-99b8c76f52558a1522f8ecc9efef7b3633656c8a.tar.bz2 otp-99b8c76f52558a1522f8ecc9efef7b3633656c8a.zip |
run_erl: Don't define _XOPEN_SOURCE on OS X
On MacOS X, defining _XOPEN_SOURCE usually *removes* features from
header files.
Therefore, we should not set _XOPEN_SOURCE to 600 since that will
remove the prototype for vsyslog(). Setting it to an empty value
or not including it will ensure that the vsyslog() prototype is
included.
Diffstat (limited to 'erts/etc')
-rw-r--r-- | erts/etc/unix/run_erl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c index 44efb975ba..22302d539a 100644 --- a/erts/etc/unix/run_erl.c +++ b/erts/etc/unix/run_erl.c @@ -42,9 +42,14 @@ # include "config.h" #endif #ifdef HAVE_WORKING_POSIX_OPENPT -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 -#endif +# ifndef _XOPEN_SOURCE + /* On OS X, we must leave _XOPEN_SOURCE undefined in order for + * the prototype of vsyslog() to be included. + */ +# ifndef __APPLE__ +# define _XOPEN_SOURCE 600 +# endif +# endif #endif #include <sys/types.h> #include <sys/wait.h> |