From 8a22366b552c2dbebb10a2dd1048c0667241a40b Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sat, 24 Jan 2026 23:33:59 -0600 Subject: [PATCH] roken: Don't define flock() ops if HAVE_FLOCK (fix #1313) --- lib/roken/roken.h.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index b64d98631..8a88d6f67 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -890,6 +890,7 @@ ROKEN_LIB_FUNCTION unsigned short ROKEN_LIB_CALL bswap16(unsigned short); * - Fallback to system flock() if available * - Fallback to POSIX fcntl() locks for NFS and other filesystems */ +#ifndef HAVE_FLOCK #ifndef LOCK_SH #define LOCK_SH 1 /* Shared lock */ #endif @@ -902,6 +903,7 @@ ROKEN_LIB_FUNCTION unsigned short ROKEN_LIB_CALL bswap16(unsigned short); #ifndef LOCK_UN #define LOCK_UN 8 /* Unlock */ #endif +#endif /* !HAVE_FLOCK */ ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_flock(int fd, int operation); #define flock(_x,_y) rk_flock(_x,_y)