summaryrefslogtreecommitdiffstats
path: root/pidfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-05 07:01:35 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-05 07:01:35 +0000
commit80e69562be86d149d753530a8a57c5babbb3f4c3 (patch)
tree021a608559e734833a7d23f03444fde66bf38076 /pidfile.c
parent05ba3fbffeaa3142e917ea69e9e39209e893581a (diff)
downloadrsyslog-80e69562be86d149d753530a8a57c5babbb3f4c3.tar.gz
rsyslog-80e69562be86d149d753530a8a57c5babbb3f4c3.tar.xz
rsyslog-80e69562be86d149d753530a8a57c5babbb3f4c3.zip
did some portability changes to make rsyslog compile on HP UX
Diffstat (limited to 'pidfile.c')
-rw-r--r--pidfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pidfile.c b/pidfile.c
index f5796d57..2be13da6 100644
--- a/pidfile.c
+++ b/pidfile.c
@@ -111,7 +111,7 @@ int write_pid (char *pidfile)
* 2006-02-16 rgerhards
*/
-#ifndef __sun
+#if HAVE_FLOCK
if (flock(fd, LOCK_EX|LOCK_NB) == -1) {
fscanf(f, "%d", &pid);
fclose(f);
@@ -130,7 +130,7 @@ int write_pid (char *pidfile)
}
fflush(f);
-#ifndef __sun
+#if HAVE_FLOCK
if (flock(fd, LOCK_UN) == -1) {
char errStr[1024];
rs_strerror_r(errno, errStr, sizeof(errStr));