summaryrefslogtreecommitdiff
path: root/src/linux
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-13 14:55:26 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-13 14:55:26 -0400
commit55b123b5ede22f5c401d2992ae933a2f935dac6c (patch)
tree443348271a9d51bf02569ae61fb8d0fd48c27a9d /src/linux
parent6f0259a4fc7d827db027fe122377687ef780e17c (diff)
downloadmusl-55b123b5ede22f5c401d2992ae933a2f935dac6c.tar.gz
add syscall wrapper for flock
it should be noted that flock does not mix well with standard fcntl locking, but nonetheless some applications will attempt to use flock instead of fcntl if both exist. options to configure or small patches may be needed. debian maintainers have plenty of experience with this unfortunate situation...
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/flock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/linux/flock.c b/src/linux/flock.c
new file mode 100644
index 00000000..87aa5cfe
--- /dev/null
+++ b/src/linux/flock.c
@@ -0,0 +1,7 @@
+#include <sys/file.h>
+#include "syscall.h"
+
+int flock(int fd, int op)
+{
+ return syscall(SYS_flock, fd, op);
+}