From 80e69562be86d149d753530a8a57c5babbb3f4c3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 5 Mar 2008 07:01:35 +0000 Subject: did some portability changes to make rsyslog compile on HP UX --- pidfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pidfile.c') 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)); -- cgit v1.2.3