* mstcpip.h: Add LP64 u_long override.
	* ws2ipdef.h: Ditto.
	* ws2tcpip.h: Ditto.


git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@6599 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/ChangeLog b/mingw-w64-headers/include/ChangeLog
index 7de5a6f..72575ee 100644
--- a/mingw-w64-headers/include/ChangeLog
+++ b/mingw-w64-headers/include/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-24  Corinna Vinschen  <vinschen@redhat.com>
+
+	* mstcpip.h: Add LP64 u_long override.
+	* ws2ipdef.h: Ditto.
+	* ws2tcpip.h: Ditto.
+
 2014-03-24  Kai Tietz  <ktietz@redhat.com>
 
 	* nap*: Add NAP API.
diff --git a/mingw-w64-headers/include/mstcpip.h b/mingw-w64-headers/include/mstcpip.h
index 14b7eb6..99e57ab 100644
--- a/mingw-w64-headers/include/mstcpip.h
+++ b/mingw-w64-headers/include/mstcpip.h
@@ -9,6 +9,12 @@
 #include <_mingw_unicode.h>
 #include <winapifamily.h>
 
+#ifdef __LP64__
+#pragma push_macro("u_long")
+#undef u_long
+#define u_long __ms_u_long
+#endif
+
 struct tcp_keepalive {
   u_long onoff;
   u_long keepalivetime;
@@ -131,5 +137,9 @@
 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
 #endif /*(_WIN32_WINNT >= 0x0502)*/
 
+#ifdef __LP64__
+#pragma pop_macro("u_long")
+#endif
+
 #endif /* _MSTCPIP_ */
 
diff --git a/mingw-w64-headers/include/ws2ipdef.h b/mingw-w64-headers/include/ws2ipdef.h
index 28daa11..fabb549 100644
--- a/mingw-w64-headers/include/ws2ipdef.h
+++ b/mingw-w64-headers/include/ws2ipdef.h
@@ -5,8 +5,15 @@
 #ifndef _WS2IPDEF_
 #define _WS2IPDEF_
 
+#include <_mingw_unicode.h>
 #include <winapifamily.h>
 
+#ifdef __LP64__
+#pragma push_macro("u_long")
+#undef u_long
+#define u_long __ms_u_long
+#endif
+
 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 
 #include <in6addr.h>
@@ -132,4 +139,8 @@
 
 #endif /* WINAPI_PARTION_DESKTOP.  */
 
+#ifdef __LP64__
+#pragma pop_macro("u_long")
+#endif
+
 #endif /*_WS2IPDEF_ */
diff --git a/mingw-w64-headers/include/ws2tcpip.h b/mingw-w64-headers/include/ws2tcpip.h
index 13f9564..a428312 100644
--- a/mingw-w64-headers/include/ws2tcpip.h
+++ b/mingw-w64-headers/include/ws2tcpip.h
@@ -8,6 +8,12 @@
 
 #include <_mingw_unicode.h>
 
+#ifdef __LP64__
+#pragma push_macro("u_long")
+#undef u_long
+#define u_long __ms_u_long
+#endif
+
 #include <winsock2.h>
 #include <ws2ipdef.h>
 #include <psdk_inc/_ip_mreq1.h>
@@ -435,4 +441,8 @@
 }
 #endif
 
+#ifdef __LP64__
+#pragma pop_macro("u_long")
+#endif
+
 #endif /* _WS2TCPIP_H_ */