diff options
author | Timothy Gu <timothygu99@gmail.com> | 2015-01-17 01:09:00 (GMT) |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2015-01-17 01:09:00 (GMT) |
commit | 19bd55b6d6c38ec7dad3a2418f3a61ee3fc9fffd (patch) | |
tree | 65fa062eacd5c6f8ad56610edb9a32b21c08c9e5 | |
parent | 62ebd7a23e841a38425b8ae9d1bc61ae8c13cd92 (diff) | |
parent | 175d1da789531129e81f1d09cc6c378837dca049 (diff) | |
download | mxe-19bd55b6d6c38ec7dad3a2418f3a61ee3fc9fffd.zip mxe-19bd55b6d6c38ec7dad3a2418f3a61ee3fc9fffd.tar.gz mxe-19bd55b6d6c38ec7dad3a2418f3a61ee3fc9fffd.tar.bz2 |
Merge pull request #601 from TobiX/glib-winxp
Make glib run on WinXP again
-rw-r--r-- | src/glib.mk | 3 | ||||
-rw-r--r-- | src/mingw-w64-2-netioapi-winxp.patch | 29 |
2 files changed, 30 insertions, 2 deletions
diff --git a/src/glib.mk b/src/glib.mk index 08bccd5..a4c3cb7 100644 --- a/src/glib.mk +++ b/src/glib.mk @@ -89,8 +89,7 @@ define $(PKG)_BUILD PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \ GLIB_GENMARSHAL='$(PREFIX)/$(TARGET)/bin/glib-genmarshal' \ GLIB_COMPILE_SCHEMAS='$(PREFIX)/$(TARGET)/bin/glib-compile-schemas' \ - GLIB_COMPILE_RESOURCES='$(PREFIX)/$(TARGET)/bin/glib-compile-resources' \ - $(if $(findstring w64-mingw32,$(TARGET)), CFLAGS="-DHAVE_IF_NAMETOINDEX=1") + GLIB_COMPILE_RESOURCES='$(PREFIX)/$(TARGET)/bin/glib-compile-resources' $(MAKE) -C '$(1)/glib' -j '$(JOBS)' install sbin_PROGRAMS= noinst_PROGRAMS= $(MAKE) -C '$(1)/gmodule' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= $(MAKE) -C '$(1)/gthread' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= diff --git a/src/mingw-w64-2-netioapi-winxp.patch b/src/mingw-w64-2-netioapi-winxp.patch new file mode 100644 index 0000000..7b13a5a --- /dev/null +++ b/src/mingw-w64-2-netioapi-winxp.patch @@ -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, |