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/epmd/src/epmd.c | 6 +++--- erts/epmd/src/epmd_int.h | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'erts/epmd/src') diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c index 94bb74c876..2d55b37ff3 100644 --- a/erts/epmd/src/epmd.c +++ b/erts/epmd/src/epmd.c @@ -286,7 +286,7 @@ static void run_daemon(EpmdVars *g) /* fork to make sure first child is not a process group leader */ if (( child_pid = fork()) < 0) { -#ifndef NO_SYSLOG +#ifdef HAVE_SYSLOG_H syslog(LOG_ERR,"erlang mapper daemon cant fork %m"); #endif epmd_cleanup_exit(g,1); @@ -312,7 +312,7 @@ static void run_daemon(EpmdVars *g) if ((child_pid = fork()) < 0) { -#ifndef NO_SYSLOG +#ifdef HAVE_SYSLOG_H syslog(LOG_ERR,"erlang mapper daemon cant fork 2'nd time %m"); #endif epmd_cleanup_exit(g,1); @@ -483,7 +483,7 @@ static void dbg_gen_printf(int onsyslog,int perr,int from_level, if (g->is_daemon) { -#ifndef NO_SYSLOG +#ifdef HAVE_SYSLOG_H if (onsyslog) { erts_vsnprintf(buf, DEBUG_BUFFER_SIZE, format, args); diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h index ac354dcc78..656dbd1f45 100644 --- a/erts/epmd/src/epmd_int.h +++ b/erts/epmd/src/epmd_int.h @@ -25,13 +25,11 @@ definitions ourselves */ #ifdef __WIN32__ -#define NO_SYSLOG #define NO_SYSCONF #define NO_DAEMON #endif #ifdef VXWORKS -#define NO_SYSLOG #define NO_SYSCONF #define NO_DAEMON #define NO_FCNTL @@ -98,7 +96,7 @@ #include -#ifndef NO_SYSLOG +#ifdef HAVE_SYSLOG_H # include #endif -- cgit v1.2.3