From 814d38ee1a111caf81e066d290fec455d13dcc9b Mon Sep 17 00:00:00 2001 From: Matt Lewandowsky Date: Wed, 11 Sep 2013 05:12:32 -0700 Subject: Fix syslog defines config.h defines HAVE_SYSLOG_H whereas the sources are looking for NO_SYSLOG to be undefined. As the logic of "if feature is available" makes more sense than "if feature is not unavailable", I opted for the config.h define. --- erts/etc/unix/run_erl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'erts/etc/unix/run_erl.c') diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c index b69e31f784..c9b2321ab0 100644 --- a/erts/etc/unix/run_erl.c +++ b/erts/etc/unix/run_erl.c @@ -60,7 +60,7 @@ #include #include #include -#ifndef NO_SYSLOG +#ifdef HAVE_SYSLOG_H # include #endif #ifdef HAVE_PTY_H @@ -197,7 +197,7 @@ static char* outbuf_in; #endif -#ifdef NO_SYSLOG +#ifndef HAVE_SYSLOG_H # define OPEN_SYSLOG() ((void) 0) #else # define OPEN_SYSLOG() openlog(simple_basename(program_name), \ @@ -415,7 +415,7 @@ int main(int argc, char **argv) } #endif -#ifndef NO_SYSLOG +#ifdef HAVE_SYSLOG_H /* Before fiddling with file descriptors we make sure syslog is turned off or "closed". In the single case where we might want it again, we will open it again instead. Would not want syslog to @@ -1163,7 +1163,7 @@ static void error_logf(int priority, int line, const char *format, ...) va_list args; va_start(args, format); -#ifndef NO_SYSLOG +#ifdef HAVE_SYSLOG_H if (run_daemon) { vsyslog(priority,format,args); } -- cgit v1.2.3 From a65f66a4ab0e1b6409a5de5fcb0c14248c292949 Mon Sep 17 00:00:00 2001 From: Matt Lewandowsky Date: Wed, 11 Sep 2013 06:59:00 -0700 Subject: Define LOG_ERR for systems without syslog.h --- erts/etc/unix/run_erl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'erts/etc/unix/run_erl.c') diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c index c9b2321ab0..2018bc007c 100644 --- a/erts/etc/unix/run_erl.c +++ b/erts/etc/unix/run_erl.c @@ -199,6 +199,7 @@ static char* outbuf_in; #ifndef HAVE_SYSLOG_H # define OPEN_SYSLOG() ((void) 0) +# define LOG_ERR NULL #else # define OPEN_SYSLOG() openlog(simple_basename(program_name), \ LOG_PID|LOG_CONS|LOG_NOWAIT,LOG_USER) -- cgit v1.2.3