summaryrefslogtreecommitdiffstats
path: root/lib/replace
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-09-16 19:44:57 +0200
committerJeremy Allison <jra@samba.org>2014-09-17 00:31:21 +0200
commitb3cc5e204d187b9a1339c928c27f7010afa8ef97 (patch)
tree51616b7bacc3a093f24787928380c3c1e7565f0d /lib/replace
parent4b788ffe65726df144af4e6aaa6ddabc141f859c (diff)
downloadsamba-b3cc5e204d187b9a1339c928c27f7010afa8ef97.tar.gz
samba-b3cc5e204d187b9a1339c928c27f7010afa8ef97.tar.xz
samba-b3cc5e204d187b9a1339c928c27f7010afa8ef97.zip
replace: Make EWOULDBLOCK always available
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
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)