aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd
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/epmd
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/epmd')
-rw-r--r--erts/epmd/src/epmd.c6
-rw-r--r--erts/epmd/src/epmd_int.h4
2 files changed, 4 insertions, 6 deletions
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 <errno.h>
-#ifndef NO_SYSLOG
+#ifdef HAVE_SYSLOG_H
# include <syslog.h>
#endif