diff options
Diffstat (limited to 'pidfile.c')
-rw-r--r-- | pidfile.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -23,6 +23,7 @@ #include "rsyslog.h" +#include "syslogd.h" /* * Sat Aug 19 13:24:33 MET DST 1995: Martin Schulze @@ -40,6 +41,8 @@ #include <fcntl.h> #endif +#include "srUtils.h" + /* read_pid * * Reads the specified pidfile and returns the read pid. @@ -121,7 +124,7 @@ int write_pid (char *pidfile) pid = getpid(); if (!fprintf(f,"%d\n", pid)) { char errStr[1024]; - strerror_r(errno, errStr, sizeof(errStr)); + rs_strerror_r(errno, errStr, sizeof(errStr)); printf("Can't write pid , %s.\n", errStr); close(fd); return 0; @@ -131,7 +134,7 @@ int write_pid (char *pidfile) #ifndef __sun if (flock(fd, LOCK_UN) == -1) { char errStr[1024]; - strerror_r(errno, errStr, sizeof(errStr)); + rs_strerror_r(errno, errStr, sizeof(errStr)); printf("Can't unlock pidfile %s, %s.\n", pidfile, errStr); close(fd); return 0; |