]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
include/compat: revert to basic locking if a OS does not have F_OFD_SETLK
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 14 Apr 2021 20:33:36 +0000 (22:33 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 9 May 2021 10:36:36 +0000 (12:36 +0200)
FreeBSD does not have the F_OFD_* versions for fcntl().
So instead F_SETLK is used instead of F_OFD_SETLK

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/include/compat.h

index 0d64f55aa9aa7728e09dda7372a3996b4c0ec160..4881e01ff98f7abd8f1586b961d29ed0db14660f 100644 (file)
 #define PROCPREFIX
 #endif
 
+#include <fcntl.h>
+#ifndef F_OFD_SETLK
+#define F_OFD_SETLK F_SETLK 
+#endif 
+
 #include <sys/stat.h>
 #ifndef ACCESSPERMS
 #define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)