RE: [perl #37708] [PATCH] wrong IP_ constants on Win32
Jan Dubois [Mon, 21 Nov 2005 21:35:51 +0000 (13:35 -0800)]
From: "Jan Dubois" <jand@ActiveState.com>
Message-ID: <062401c5ef26$99b3a490$2217a8c0@candy>

p4raw-id: //depot/perl@26189

win32/include/sys/socket.h

index 0f71ad8..d2ef6e7 100644 (file)
@@ -15,7 +15,11 @@ extern "C" {
 #  define Win32_Winsock
 #endif
 #include <windows.h>
-#include <winsock.h>
+
+/* Too late to include winsock2.h if winsock.h has already been loaded */
+#ifndef _WINSOCKAPI_
+#  include <winsock2.h>
+#endif
 
 #include "win32.h"