summaryrefslogtreecommitdiffstats
path: root/pidfile.c
diff options
context:
space:
mode:
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));