--- glib-2.40.0/glib/grand.c.orig 2014-02-22 16:29:07.000000000 +0100 +++ glib-2.40.0/glib/grand.c 2014-03-25 18:45:39.693348981 +0100 @@ -55,6 +55,7 @@ #endif #ifdef G_OS_WIN32 +#include #include #endif --- glib-2.44.0/gio/gwin32networking.h.orig 2015-03-20 18:33:38.000000000 +0100 +++ glib-2.44.0/gio/gwin32networking.h 2015-03-23 21:03:15.924279829 +0100 @@ -24,8 +24,9 @@ /* Check if more ANSI-compliant Winsock2 functions are provided */ /* For run-time compatibility with Windows XP, remove when XP support dropped */ -typedef INT (WSAAPI *PFN_InetPton) (INT, PCTSTR, PVOID); -typedef PCTSTR (WSAAPI *PFN_InetNtop) (INT, PVOID, PTSTR, size_t); +typedef ULONG NET_IFINDEX; +typedef INT (WSAAPI *PFN_InetPton) (INT, LPCTSTR, PVOID); +typedef LPCTSTR (WSAAPI *PFN_InetNtop) (INT, PVOID, PTSTR, size_t); typedef NET_IFINDEX (WINAPI *PFN_IfNameToIndex) (PCSTR); typedef struct _GWin32WinsockFuncs --- glib-2.46.0/glib/gstrfuncs.c.orig 2015-09-12 18:05:31.000000000 +0200 +++ glib-2.46.0/glib/gstrfuncs.c 2015-09-22 17:09:13.736714571 +0200 @@ -1272,7 +1272,7 @@ gchar buf[1024]; GError *error = NULL; -#if defined(G_OS_WIN32) +#if defined(G_OS_WIN32) && !defined(__MINGW32__) strerror_s (buf, sizeof (buf), errnum); msg = buf; #elif defined(HAVE_STRERROR_R) --- glib-2.46.0/gio/gwin32appinfo.c.orig 2015-09-21 14:37:29.000000000 +0200 +++ glib-2.46.0/gio/gwin32appinfo.c 2015-09-22 17:34:28.039984356 +0200 @@ -34,6 +34,11 @@ #include #include +#include + +#ifndef LOAD_LIBRARY_AS_IMAGE_RESOURCE +#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x20 +#endif /* We need to watch 8 places: * 0) HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations --- glib-2.46.0/gio/gwin32registrykey.c.orig 2015-09-21 12:44:58.000000000 +0200 +++ glib-2.46.0/gio/gwin32registrykey.c 2015-09-22 18:50:25.926459740 +0200 @@ -25,10 +25,21 @@ #pragma warning ( disable:4005 ) #endif #include +#ifdef __MINGW32__ +#include +#include +#if !defined HKEY_PERFORMANCE_NLSTEXT +#define HKEY_PERFORMANCE_NLSTEXT (( HKEY ) (ULONG_PTR)((LONG)0x80000060) ) +#endif +#if ! defined HKEY_PERFORMANCE_TEXT +#define HKEY_PERFORMANCE_TEXT (( HKEY ) (ULONG_PTR)((LONG)0x80000050) ) +#endif +#else #include #include +#endif -#ifndef _WDMDDK_ +#if !defined(_WDMDDK_) && !defined(__WINDDK_H) typedef enum _KEY_INFORMATION_CLASS { KeyBasicInformation, KeyNodeInformation, --- glib-2.46.1/glib/gwin32.c.orig 2015-10-14 15:04:10.000000000 +0200 +++ glib-2.46.1/glib/gwin32.c 2015-10-16 18:30:22.408973356 +0200 @@ -59,6 +59,9 @@ #ifdef _MSC_VER #pragma comment (lib, "ntoskrnl.lib") #endif + +#else +#include #endif #include "glib.h"