From 7700551e7a5b9dbfcd3968ea55f836da51a138db Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 23 Aug 2008 20:31:27 +0000 Subject: [PATCH] - more fixes for inet_* with vc9/xp --- ext/standard/flock_compat.c | 3 ++- ext/standard/flock_compat.h | 2 ++ win32/inet.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index d5b262ef9c..b9db317ec5 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -163,6 +163,7 @@ PHPAPI int php_flock(int fd, int operation) } #endif +#ifndef PHP_WIN32 #if !(HAVE_INET_ATON) /* {{{ inet_aton * Check whether "cp" is a valid ascii representation @@ -226,7 +227,7 @@ int inet_aton(const char *cp, struct in_addr *ap) } /* }}} */ #endif /* !HAVE_INET_ATON */ - +#endif /* !PHP_WIN32 */ /* * Local variables: * tab-width: 4 diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h index 3e0fcd7c33..84f1b6b011 100644 --- a/ext/standard/flock_compat.h +++ b/ext/standard/flock_compat.h @@ -49,7 +49,9 @@ PHPAPI int flock(int fd, int operation); #include #endif +#ifndef PHP_WIN32 extern int inet_aton(const char *, struct in_addr *); #endif +#endif #endif /* FLOCK_COMPAT_H */ diff --git a/win32/inet.h b/win32/inet.h index 7988bdb9e2..9e08094dbe 100644 --- a/win32/inet.h +++ b/win32/inet.h @@ -1,7 +1,9 @@ +#include "config.w32.h" #if _MSC_VER >= 1500 # include #endif #include + #if (_WIN32_WINNT < 0x0600) /* Vita/2k8 have these functions */ PHPAPI int inet_pton(int af, const char* src, void* dst); PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size); -- 2.40.0