diff options
Diffstat (limited to 'ext/standard/flock_compat.h')
-rw-r--r-- | ext/standard/flock_compat.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h index a0c4054ff6..29a9c033cd 100644 --- a/ext/standard/flock_compat.h +++ b/ext/standard/flock_compat.h @@ -42,9 +42,12 @@ PHPAPI int flock(int fd, int operation); #define PHP_LOCK_NB 4 #ifdef PHP_WIN32 -#define EWOULDBLOCK WSAEWOULDBLOCK -# define fsync _commit -# define ftruncate(a, b) chsize(a, b) +# ifdef EWOULDBLOCK +# undef EWOULDBLOCK +# endif +# define EWOULDBLOCK WSAEWOULDBLOCK +# define fsync _commit +# define ftruncate(a, b) chsize(a, b) #endif /* defined(PHP_WIN32) */ #if !HAVE_INET_ATON |