changeset 3773:42666a54673f

mingw-w64: added mingw-w64-2-netioapi-winxp.patch from mxe * mingw-w64-2-netioapi-winxp.patch: new file * dist-files.mk: added mingw-w64-2-netioapi-winxp.patch
author John Donoghue
date Wed, 21 Jan 2015 08:21:40 -0500
parents 078b47125239
children d76aee4b2c2b
files dist-files.mk src/mingw-w64-2-netioapi-winxp.patch
diffstat 2 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Thu Jan 15 10:10:06 2015 -0500
+++ b/dist-files.mk	Wed Jan 21 08:21:40 2015 -0500
@@ -328,6 +328,7 @@
   mingw-units-1-fixes.patch \
   mingw-utils-1-portability-fix.patch \
   mingw-w64-1-float-h.patch \
+  mingw-w64-2-netioapi-winxp.patch \
   mingw-w64.mk \
   mingwrt.mk \
   mman-win32-1-include_name_change.patch \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/mingw-w64-2-netioapi-winxp.patch	Wed Jan 21 08:21:40 2015 -0500
@@ -0,0 +1,29 @@
+This file is part of MXE.
+See index.html for further information.
+
+Some functions in netioapi.h were only added in Windows Vista. This patch removes
+function definitions for if_nametoindex and if_indextoname on older API
+versions, so they don't conflict with replacement implementations in libraries
+(e.g. glib).
+
+This is fixed on the 4.x branch of mingw-w64.
+
+diff -Naur mingw-w64-v3.3.0.orig/mingw-w64-headers/include/netioapi.h mingw-w64-v3.3.0/mingw-w64-headers/include/netioapi.h
+--- mingw-w64-v3.3.0.orig/mingw-w64-headers/include/netioapi.h	2015-01-17 00:07:51.030935703 +0100
++++ mingw-w64-v3.3.0/mingw-w64-headers/include/netioapi.h	2015-01-17 01:09:47.546591536 +0100
+@@ -311,6 +311,7 @@
+   PNET_LUID InterfaceLuid
+ );
+ 
++#if (_WIN32_WINNT >= 0x0600)
+ PCHAR WINAPI if_indextoname(
+   NET_IFINDEX InterfaceIndex,
+   PCHAR InterfaceName
+@@ -319,6 +320,7 @@
+ NET_IFINDEX WINAPI if_nametoindex(
+   PCSTR InterfaceName
+ );
++#endif
+ 
+ NETIO_STATUS WINAPI ConvertInterfaceGuidToLuid(
+   const GUID *InterfaceGuid,