diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-30 12:52:48 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-30 12:52:48 +0000 |
commit | a22d90e47d420492c98ade168780ba7d3964419b (patch) | |
tree | 3104dd7deba0b4d9ec35903d8fafd9fbb862a8d1 /src/libstddjb/lock_unx.c | |
parent | f65cd7e93eeb39d7ebb4066793345dd45051abe2 (diff) | |
download | skalibs-a22d90e47d420492c98ade168780ba7d3964419b.tar.xz |
Add lock_unx()
Diffstat (limited to 'src/libstddjb/lock_unx.c')
-rw-r--r-- | src/libstddjb/lock_unx.c | 11 |
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 ; +} |