From a22d90e47d420492c98ade168780ba7d3964419b Mon Sep 17 00:00:00 2001
From: Laurent Bercot
+ void lock_unx (int fd)
+Like lock_un, but without a return code and without
+modifying errno.
+
int open2 (char const *file, unsigned int flags)
Safe wrapper around
diff --git a/package/deps.mak b/package/deps.mak
index 5caeaa4..acce8a0 100644
--- a/package/deps.mak
+++ b/package/deps.mak
@@ -388,6 +388,7 @@ src/libstddjb/lock_exnb.o src/libstddjb/lock_exnb.lo: src/libstddjb/lock_exnb.c
src/libstddjb/lock_sh.o src/libstddjb/lock_sh.lo: src/libstddjb/lock_sh.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/lock_shnb.o src/libstddjb/lock_shnb.lo: src/libstddjb/lock_shnb.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
src/libstddjb/lock_un.o src/libstddjb/lock_un.lo: src/libstddjb/lock_un.c src/include/skalibs/djbunix.h src/include/skalibs/nonposix.h src/include/skalibs/sysdeps.h
+src/libstddjb/lock_unx.o src/libstddjb/lock_unx.lo: src/libstddjb/lock_unx.c src/include/skalibs/djbunix.h
src/libstddjb/lolprintf.o src/libstddjb/lolprintf.lo: src/libstddjb/lolprintf.c src/include/skalibs/buffer.h src/include/skalibs/lolstdio.h
src/libstddjb/ltm64_from_localtm.o src/libstddjb/ltm64_from_localtm.lo: src/libstddjb/ltm64_from_localtm.c src/include/skalibs/djbtime.h src/include/skalibs/tai.h
src/libstddjb/ltm64_from_sysclock.o src/libstddjb/ltm64_from_sysclock.lo: src/libstddjb/ltm64_from_sysclock.c src/include/skalibs/config.h src/include/skalibs/djbtime.h src/include/skalibs/tai.h
diff --git a/src/include/skalibs/djbunix.h b/src/include/skalibs/djbunix.h
index f4cac8a..4dc534e 100644
--- a/src/include/skalibs/djbunix.h
+++ b/src/include/skalibs/djbunix.h
@@ -39,6 +39,7 @@ extern int lock_exnb (int) ;
extern int lock_sh (int) ;
extern int lock_shnb (int) ;
extern int lock_un (int) ;
+extern void lock_unx (int) ;
extern int open2 (char const *, unsigned int) ;
extern int open3 (char const *, unsigned int, unsigned int) ;
extern int open_read (char const *) ;
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