From 99b8c76f52558a1522f8ecc9efef7b3633656c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 15 Mar 2016 12:51:50 +0100 Subject: 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. --- erts/etc/unix/run_erl.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'erts/etc/unix') 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 #include -- cgit v1.2.3