summaryrefslogtreecommitdiff
path: root/src/libstddjb
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-10-30 12:52:48 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-10-30 12:52:48 +0000
commita22d90e47d420492c98ade168780ba7d3964419b (patch)
tree3104dd7deba0b4d9ec35903d8fafd9fbb862a8d1 /src/libstddjb
parentf65cd7e93eeb39d7ebb4066793345dd45051abe2 (diff)
downloadskalibs-a22d90e47d420492c98ade168780ba7d3964419b.tar.xz
Add lock_unx()
Diffstat (limited to 'src/libstddjb')
-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 ;
+}