chiark / gitweb /
Check that EWOULDBLOCK is the same as EAGAIN
[elogind.git] / src / shared / util.c
index 55de83023d53c1e6c34226e532df505418473561..1994c7e05d0923036bb51de3796986dd78597f79 100644 (file)
@@ -94,6 +94,9 @@
 #include "def.h"
 #include "sparse-endian.h"
 
+/* Put this test here for a lack of better place */
+assert_cc(EAGAIN == EWOULDBLOCK);
+
 int saved_argc = 0;
 char **saved_argv = NULL;
 
@@ -6668,7 +6671,7 @@ int getpeersec(int fd, char **ret) {
 
         if (isempty(s)) {
                 free(s);
-                return -ENOTSUP;
+                return -EOPNOTSUPP;
         }
 
         *ret = s;