summaryrefslogtreecommitdiffstats
path: root/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/replace.h4
-rw-r--r--lib/replace/wscript1
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index bc40bf012e..3ff4e36577 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -41,6 +41,10 @@
#include <stdarg.h>
#include <errno.h>
+#ifndef HAVE_DECL_EWOULDBLOCK
+#define EWOULDBLOCK EAGAIN
+#endif
+
#if defined(_MSC_VER) || defined(__MINGW32__)
#include "win32_replace.h"
#endif
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 6f2fb66a2c..16fd50b7b5 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -518,6 +518,7 @@ removeea setea
conf.CHECK_DECLS('snprintf vsnprintf asprintf vasprintf')
conf.CHECK_DECLS('errno', headers='errno.h', reverse=True)
+ conf.CHECK_DECLS('EWOULDBLOCK', headers='errno.h')
conf.CHECK_DECLS('environ getgrent_r getpwent_r', reverse=True, headers='pwd.h grp.h')
conf.CHECK_DECLS('pread pwrite setenv setresgid setresuid', reverse=True)