roken: Don't define flock() ops if HAVE_FLOCK (fix #1313)

This commit is contained in:
Nicolas Williams
2026-01-24 23:33:59 -06:00
parent 1a7e3c4a5c
commit 8a22366b55

View File

@@ -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)