aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-09-24 08:35:26 +0200
committerFredrik Gustafsson <[email protected]>2013-09-24 08:35:26 +0200
commit5fb8ad6250e2a40b12824f89c42dc91b04a39c40 (patch)
treea5b29c84b1c84784a6194a85acdcd79ce46fcb74 /erts/etc
parent589a9ed126d205007e79c22053d1b156a383d99f (diff)
parenta65f66a4ab0e1b6409a5de5fcb0c14248c292949 (diff)
downloadotp-5fb8ad6250e2a40b12824f89c42dc91b04a39c40.tar.gz
otp-5fb8ad6250e2a40b12824f89c42dc91b04a39c40.tar.bz2
otp-5fb8ad6250e2a40b12824f89c42dc91b04a39c40.zip
Merge branch 'lewellyn/nosyslog/OTP-11349' into maint
* lewellyn/nosyslog/OTP-11349: Define LOG_ERR for systems without syslog.h Fix syslog defines
Diffstat (limited to 'erts/etc')
-rw-r--r--erts/etc/unix/run_erl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c
index b69e31f784..2018bc007c 100644
--- a/erts/etc/unix/run_erl.c
+++ b/erts/etc/unix/run_erl.c
@@ -60,7 +60,7 @@
#include <dirent.h>
#include <termios.h>
#include <time.h>
-#ifndef NO_SYSLOG
+#ifdef HAVE_SYSLOG_H
# include <syslog.h>
#endif
#ifdef HAVE_PTY_H
@@ -197,8 +197,9 @@ static char* outbuf_in;
#endif
-#ifdef NO_SYSLOG
+#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)
@@ -415,7 +416,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 +1164,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);
}