summaryrefslogtreecommitdiffstats
path: root/compat.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2014-09-23 10:44:45 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2014-09-23 10:44:45 +0100
commitb2224947fa697c397b5d3617b6b17e96c4302e6c (patch)
treed8ac68782b4d7196405eaf8fc800abcf2e7bec91 /compat.h
parent4d53fd98a67b20527718013ef52f263bf878481c (diff)
Solaris doesn't have flock and fcntl is useless so make a no-op flock. Reported
by Dagobert Michelsen.
Diffstat (limited to 'compat.h')
-rw-r--r--compat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compat.h b/compat.h
index bf6e5360..2e433a09 100644
--- a/compat.h
+++ b/compat.h
@@ -176,6 +176,13 @@ typedef uint64_t u_int64_t;
#define TTY_NAME_MAX 32
#endif
+#ifndef HAVE_FLOCK
+#define LOCK_SH 0
+#define LOCK_EX 0
+#define LOCK_NB 0
+#define flock(fd, op) (0)
+#endif
+
#ifndef HAVE_BZERO
#undef bzero
#define bzero(buf, len) memset(buf, 0, len);