diff options
Diffstat (limited to 'src/libstddjb/error_isalready.c')
-rw-r--r-- | src/libstddjb/error_isalready.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 <skalibs/bsdsnowflake.h> +#include <errno.h> +#include <skalibs/error.h> + +int error_isalready (int e) +{ + return e == EALREADY || e == EINPROGRESS +#ifdef SKALIBS_BSD_SUCKS + || e == ADDRINUSE +#endif + ; +} |