From: Jan Dubois <jand@activestate.com>
Date: Mon, 21 Nov 2005 21:35:51 +0000 (-0800)
Subject: RE: [perl #37708] [PATCH] wrong IP_ constants on Win32
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a86d78b98bbb3a5fa56caee3b81e72336148be12;p=p5sagit%2Fp5-mst-13.2.git

RE: [perl #37708] [PATCH] wrong IP_ constants on Win32
From: "Jan Dubois" <jand@ActiveState.com>
Message-ID: <062401c5ef26$99b3a490$2217a8c0@candy>

p4raw-id: //depot/perl@26189
---

diff --git a/win32/include/sys/socket.h b/win32/include/sys/socket.h
index 0f71ad8..d2ef6e7 100644
--- a/win32/include/sys/socket.h
+++ b/win32/include/sys/socket.h
@@ -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"