Commit f748b55a authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

winrt: Fix some mingw-w64 headers

parent 331356d3
......@@ -13,7 +13,7 @@ ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY missing-snprintf.patch .
COPY add-GetAdaptersAddress.path .
COPY mingw-w64-windows10.patch .
RUN mkdir /build && cd /build && \
mkdir $TOOLCHAIN_PREFIX && \
......@@ -52,7 +52,7 @@ RUN mkdir /build && cd /build && \
make install-gcc && \
cd /build/mingw-w64/mingw-w64-crt && \
git am ../../../missing-snprintf.patch && \
git am ../../../add-GetAdaptersAddress.path && \
git am ../../mingw-w64-windows10.patch && \
mkdir build && cd build && \
../configure --prefix=$MINGW_PREFIX \
--host=$TARGET_TUPLE && \
......
From f563cdaf1cbfc7c977103c59769eb9842123b98e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 16 Jun 2016 15:56:54 +0200
Subject: [PATCH] headers: iphlpapi.h is fully available on windows10
---
mingw-w64-headers/include/iphlpapi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-headers/include/iphlpapi.h b/mingw-w64-headers/include/iphlpapi.h
index 03aed33..4df7607 100644
--- a/mingw-w64-headers/include/iphlpapi.h
+++ b/mingw-w64-headers/include/iphlpapi.h
@@ -8,7 +8,7 @@
#include <winapifamily.h>
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= 0x0A00
#ifdef __cplusplus
extern "C" {
--
2.8.1
From e99c487742228b7198db15db9292f79eb71d90e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 16 Jun 2016 15:56:54 +0200
Subject: [PATCH] headers: Adjust header guards for Windows 10
---
mingw-w64-headers/include/iphlpapi.h | 6 +++++-
mingw-w64-headers/include/iprtrmib.h | 5 +++++
mingw-w64-headers/include/mprapi.h | 6 ++++++
mingw-w64-headers/include/nldef.h | 2 +-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-headers/include/iphlpapi.h b/mingw-w64-headers/include/iphlpapi.h
index 03aed33..b28df42 100644
--- a/mingw-w64-headers/include/iphlpapi.h
+++ b/mingw-w64-headers/include/iphlpapi.h
@@ -8,7 +8,7 @@
#include <winapifamily.h>
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= 0x0A00
#ifdef __cplusplus
extern "C" {
@@ -19,6 +19,8 @@ extern "C" {
#include <iptypes.h>
#include <tcpestats.h>
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
DWORD WINAPI GetNumberOfInterfaces (PDWORD pdwNumIf);
DWORD WINAPI GetIfEntry (PMIB_IFROW pIfRow);
DWORD WINAPI GetIfTable (PMIB_IFTABLE pIfTable, PULONG pdwSize, WINBOOL bOrder);
@@ -94,6 +96,8 @@ extern "C" {
ULONG WINAPI GetAdaptersInfo (PIP_ADAPTER_INFO AdapterInfo, PULONG SizePointer);
PIP_ADAPTER_ORDER_MAP WINAPI GetAdapterOrderMap (VOID);
+#endif
+
#ifdef _WINSOCK2API_
ULONG WINAPI GetAdaptersAddresses (ULONG Family, ULONG Flags, PVOID Reserved, PIP_ADAPTER_ADDRESSES AdapterAddresses, PULONG SizePointer);
#endif
diff --git a/mingw-w64-headers/include/iprtrmib.h b/mingw-w64-headers/include/iprtrmib.h
index 93e0cad..65ca264 100644
--- a/mingw-w64-headers/include/iprtrmib.h
+++ b/mingw-w64-headers/include/iprtrmib.h
@@ -6,6 +6,9 @@
#ifndef __ROUTING_IPRTRMIB_H__
#define __ROUTING_IPRTRMIB_H__
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#include <mprapi.h>
#include <ipmib.h>
#include <ipifcons.h>
@@ -772,4 +775,6 @@ typedef enum _TCPIP_OWNER_MODULE_INFO_CLASS {
#define CAST_MIB_INFO(X,Y,Z) Z = (Y)(X->rgbyData)
+#endif /*WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)*/
+
#endif /* __ROUTING_IPRTRMIB_H__ */
diff --git a/mingw-w64-headers/include/mprapi.h b/mingw-w64-headers/include/mprapi.h
index 2103c2b..7bbc1d7 100644
--- a/mingw-w64-headers/include/mprapi.h
+++ b/mingw-w64-headers/include/mprapi.h
@@ -9,6 +9,10 @@
#include <lmcons.h>
#include <ras.h>
+#include <winapifamily.h>
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -991,4 +995,6 @@ DWORD APIENTRY MprAdminServerSetInfoEx(
}
#endif
+#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) */
+
#endif /* __ROUTING_MPRADMIN_H__ */
diff --git a/mingw-w64-headers/include/nldef.h b/mingw-w64-headers/include/nldef.h
index 5a6a767..e61f104 100644
--- a/mingw-w64-headers/include/nldef.h
+++ b/mingw-w64-headers/include/nldef.h
@@ -7,7 +7,7 @@
#define _NLDEF_
#include <winapifamily.h>
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= 0x0A00
typedef enum {
NldsInvalid,
--
2.8.1
......@@ -14,7 +14,7 @@ ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY no-rtl-func.patch .
COPY missing-snprintf.patch .
COPY add-GetAdaptersAddress.path .
COPY mingw-w64-windows10.patch .
RUN mkdir /build && cd /build && \
mkdir $TOOLCHAIN_PREFIX && \
......@@ -27,7 +27,7 @@ RUN mkdir /build && cd /build && \
git clone --depth=1 git://git.code.sf.net/p/mingw-w64/mingw-w64 && \
cd mingw-w64 && git am ../../no-rtl-func.patch && \
git am ../../missing-snprintf.patch && \
git am ../../add-GetAdaptersAddress.path && \
git am ../../mingw-w64-windows10.patch && \
cd .. && \
tar xf gcc-5.3.0.tar.bz2 && \
tar xf binutils-2.26.tar.bz2 && \
......
From f563cdaf1cbfc7c977103c59769eb9842123b98e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 16 Jun 2016 15:56:54 +0200
Subject: [PATCH] headers: iphlpapi.h is fully available on windows10
---
mingw-w64-headers/include/iphlpapi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-headers/include/iphlpapi.h b/mingw-w64-headers/include/iphlpapi.h
index 03aed33..4df7607 100644
--- a/mingw-w64-headers/include/iphlpapi.h
+++ b/mingw-w64-headers/include/iphlpapi.h
@@ -8,7 +8,7 @@
#include <winapifamily.h>
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= 0x0A00
#ifdef __cplusplus
extern "C" {
--
2.8.1
From e99c487742228b7198db15db9292f79eb71d90e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Thu, 16 Jun 2016 15:56:54 +0200
Subject: [PATCH] headers: Adjust header guards for Windows 10
---
mingw-w64-headers/include/iphlpapi.h | 6 +++++-
mingw-w64-headers/include/iprtrmib.h | 5 +++++
mingw-w64-headers/include/mprapi.h | 6 ++++++
mingw-w64-headers/include/nldef.h | 2 +-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-headers/include/iphlpapi.h b/mingw-w64-headers/include/iphlpapi.h
index 03aed33..b28df42 100644
--- a/mingw-w64-headers/include/iphlpapi.h
+++ b/mingw-w64-headers/include/iphlpapi.h
@@ -8,7 +8,7 @@
#include <winapifamily.h>
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= 0x0A00
#ifdef __cplusplus
extern "C" {
@@ -19,6 +19,8 @@ extern "C" {
#include <iptypes.h>
#include <tcpestats.h>
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
DWORD WINAPI GetNumberOfInterfaces (PDWORD pdwNumIf);
DWORD WINAPI GetIfEntry (PMIB_IFROW pIfRow);
DWORD WINAPI GetIfTable (PMIB_IFTABLE pIfTable, PULONG pdwSize, WINBOOL bOrder);
@@ -94,6 +96,8 @@ extern "C" {
ULONG WINAPI GetAdaptersInfo (PIP_ADAPTER_INFO AdapterInfo, PULONG SizePointer);
PIP_ADAPTER_ORDER_MAP WINAPI GetAdapterOrderMap (VOID);
+#endif
+
#ifdef _WINSOCK2API_
ULONG WINAPI GetAdaptersAddresses (ULONG Family, ULONG Flags, PVOID Reserved, PIP_ADAPTER_ADDRESSES AdapterAddresses, PULONG SizePointer);
#endif
diff --git a/mingw-w64-headers/include/iprtrmib.h b/mingw-w64-headers/include/iprtrmib.h
index 93e0cad..65ca264 100644
--- a/mingw-w64-headers/include/iprtrmib.h
+++ b/mingw-w64-headers/include/iprtrmib.h
@@ -6,6 +6,9 @@
#ifndef __ROUTING_IPRTRMIB_H__
#define __ROUTING_IPRTRMIB_H__
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#include <mprapi.h>
#include <ipmib.h>
#include <ipifcons.h>
@@ -772,4 +775,6 @@ typedef enum _TCPIP_OWNER_MODULE_INFO_CLASS {
#define CAST_MIB_INFO(X,Y,Z) Z = (Y)(X->rgbyData)
+#endif /*WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)*/
+
#endif /* __ROUTING_IPRTRMIB_H__ */
diff --git a/mingw-w64-headers/include/mprapi.h b/mingw-w64-headers/include/mprapi.h
index 2103c2b..7bbc1d7 100644
--- a/mingw-w64-headers/include/mprapi.h
+++ b/mingw-w64-headers/include/mprapi.h
@@ -9,6 +9,10 @@
#include <lmcons.h>
#include <ras.h>
+#include <winapifamily.h>
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -991,4 +995,6 @@ DWORD APIENTRY MprAdminServerSetInfoEx(
}
#endif
+#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) */
+
#endif /* __ROUTING_MPRADMIN_H__ */
diff --git a/mingw-w64-headers/include/nldef.h b/mingw-w64-headers/include/nldef.h
index 5a6a767..e61f104 100644
--- a/mingw-w64-headers/include/nldef.h
+++ b/mingw-w64-headers/include/nldef.h
@@ -7,7 +7,7 @@
#define _NLDEF_
#include <winapifamily.h>
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= 0x0A00
typedef enum {
NldsInvalid,
--
2.8.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment