From d44819ae9c55f4d3c0f347b2640f58a2deddebb4 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 22 Jul 2019 13:58:11 +0000 Subject: Factor all the BSD complaints into one new header --- src/libstddjb/error_isalready.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/libstddjb/error_isalready.c (limited to 'src/libstddjb/error_isalready.c') diff --git a/src/libstddjb/error_isalready.c b/src/libstddjb/error_isalready.c new file mode 100644 index 0000000..db63932 --- /dev/null +++ b/src/libstddjb/error_isalready.c @@ -0,0 +1,14 @@ +/* ISC license. */ + +#include +#include +#include + +int error_isalready (int e) +{ + return e == EALREADY || e == EINPROGRESS +#ifdef SKALIBS_BSD_SUCKS + || e == ADDRINUSE +#endif + ; +} -- cgit v1.2.3