summaryrefslogtreecommitdiff
path: root/src/libstddjb/lock_unx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/lock_unx.c')
-rw-r--r--src/libstddjb/lock_unx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstddjb/lock_unx.c b/src/libstddjb/lock_unx.c
new file mode 100644
index 0000000..d2f8483
--- /dev/null
+++ b/src/libstddjb/lock_unx.c
@@ -0,0 +1,11 @@
+/* ISC license. */
+
+#include <errno.h>
+#include <skalibs/djbunix.h>
+
+void lock_unx (int fd)
+{
+ int e = errno ;
+ lock_un(fd) ;
+ errno = e ;
+}