aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/bindfs.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a90288..78fe040 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2020-09-23 Martin Pärtel <martin dot partel at gmail dot com>
* Added missing include for "sys/file.h".
+ * Added flock copy-pasta needed by XCode 12 (issue #88).
2020-05-13 Martin Pärtel <martin dot partel at gmail dot com>
* Fixed missing newlines bug with --map-passwd and --map-group
diff --git a/src/bindfs.c b/src/bindfs.c
index 5f82af3..8e561f8 100644
--- a/src/bindfs.c
+++ b/src/bindfs.c
@@ -106,6 +106,13 @@
#define A_PREFIX "com"
#define A_KAUTH_FILESEC_XATTR A_PREFIX ".apple.system.Security"
#define XATTR_APPLE_PREFIX "com.apple."
+
+// Yes, Apple asks us to copy/paste these -.-
+#define LOCK_SH 1 /* shared lock */
+#define LOCK_EX 2 /* exclusive lock */
+#define LOCK_NB 4 /* don't block when locking */
+#define LOCK_UN 8 /* unlock */
+int flock(int fd, int operation);
#endif
/* We pessimistically assume signed uid_t and gid_t in our overflow checks,