summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/sockets/multicast.c3
-rw-r--r--ext/sockets/sockets.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index 670d29f7ad..e29106087e 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -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>
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 4adb09f188..1eee7a6202 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -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