]> granicus.if.org Git - php/commitdiff
Fixed sockets ext build on win
authorAnatoliy Belsky <ab@php.net>
Tue, 13 Nov 2012 13:53:32 +0000 (14:53 +0100)
committerAnatoliy Belsky <ab@php.net>
Tue, 13 Nov 2012 13:53:32 +0000 (14:53 +0100)
ext/sockets/multicast.c
ext/sockets/sockets.c

index 670d29f7ad522b04741ff505e2f91ccbf9c82228..e29106087e10c43f7ea714f08864909021f23dfe 100644 (file)
@@ -38,6 +38,9 @@
 # define NTDDI_XP NTDDI_WINXP /* bug in SDK */
 # include <IPHlpApi.h>
 # undef NTDDI_XP
+# if _WIN32_WINNT >= 0x0600
+#  define HAVE_IF_NAMETOINDEX 1
+# endif
 #else
 #include <sys/socket.h>
 #include <sys/ioctl.h>
index 4adb09f188aa74afebfab5c5e2d43c56dc686be0..1eee7a6202c3f0db5e90305f793554f766a7f2ce 100644 (file)
@@ -57,6 +57,7 @@
 # define h_errno               WSAGetLastError()
 # define set_errno(a)          WSASetLastError(a)
 # define close(a)              closesocket(a)
+# include <IPHlpApi.h>
 # if _WIN32_WINNT >= 0x0600
 #  define HAVE_IF_NAMETOINDEX 1
 # endif