diff options
| author | Gustavo Lopes <glopes@nebm.ist.utl.pt> | 2013-01-31 16:34:46 +0100 |
|---|---|---|
| committer | Gustavo Lopes <glopes@nebm.ist.utl.pt> | 2013-02-02 16:38:09 +0100 |
| commit | e2fc17c833c5122327438c82fc0dc4b689268f59 (patch) | |
| tree | bc37232ed10b306eec74d055f34e15b6f620a551 | |
| parent | 608254fa5757ee07999d5c4bec660b8c29780938 (diff) | |
| download | php-git-e2fc17c833c5122327438c82fc0dc4b689268f59.tar.gz | |
Fix multicast.c not defining errno on Windows
Small cleanups in includes as well.
| -rw-r--r-- | ext/sockets/multicast.c | 14 | ||||
| -rw-r--r-- | ext/sockets/sockaddr_conv.h | 1 | ||||
| -rw-r--r-- | ext/sockets/windows_common.h | 2 |
3 files changed, 3 insertions, 14 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 5d29c9c5e2..c6de3198e4 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -28,19 +28,7 @@ #include "php_network.h" #ifdef PHP_WIN32 -# include "win32/inet.h" -# include <winsock2.h> -# include <windows.h> -# include <Ws2tcpip.h> -# include <Ws2ipdef.h> -# include "php_sockets.h" -# include "win32/sockets.h" -# define NTDDI_XP NTDDI_WINXP /* bug in SDK */ -# include <IPHlpApi.h> -# undef NTDDI_XP -# if _WIN32_WINNT >= 0x0600 -# define HAVE_IF_NAMETOINDEX 1 -# endif +# include "windows_common.h" #else #include <sys/socket.h> #include <sys/ioctl.h> diff --git a/ext/sockets/sockaddr_conv.h b/ext/sockets/sockaddr_conv.h index 665c73913f..8e51edac8f 100644 --- a/ext/sockets/sockaddr_conv.h +++ b/ext/sockets/sockaddr_conv.h @@ -1,7 +1,6 @@ #ifndef PHP_SOCKADR_CONV_H #define PHP_SOCKADR_CONV_H -#define HAVE_SOCKETS 1 #include <php_network.h> #include "php_sockets.h" /* php_socket */ diff --git a/ext/sockets/windows_common.h b/ext/sockets/windows_common.h index 1dc966ac00..c72c6987e6 100644 --- a/ext/sockets/windows_common.h +++ b/ext/sockets/windows_common.h @@ -17,7 +17,9 @@ #define WINDOWS_COMMON_H #include <Winsock2.h> +#define NTDDI_XP NTDDI_WINXP /* bug in SDK */ #include <IPHlpApi.h> /* conflicting definition of CMSG_DATA */ +#undef NTDDI_XP #define HAVE_IF_NAMETOINDEX 1 |
