--- glib-2.36.3/gio/giomodule.c.w2k	2013-06-03 01:20:49.000000000 +0200
+++ glib-2.36.3/gio/giomodule.c	2013-08-25 19:20:29.605753418 +0200
@@ -922,10 +922,11 @@
 void *
 _g_io_win32_get_module (void)
 {
-  if (!gio_dll)
-    GetModuleHandleExA (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
-                        (const char *) _g_io_win32_get_module,
-                        &gio_dll);
+  if (!gio_dll) {
+    MEMORY_BASIC_INFORMATION MemInfo;
+    VirtualQuery((const char *) _g_io_win32_get_module, &MemInfo, sizeof(MemInfo));
+    gio_dll = (HMODULE)MemInfo.AllocationBase;
+  }
   return gio_dll;
 }
 
--- glib-2.36.3/gio/gnetworkaddress.c.w2k	2013-08-25 20:20:51.100407488 +0200
+++ glib-2.36.3/gio/gnetworkaddress.c	2013-08-25 20:25:12.774346527 +0200
@@ -36,6 +36,7 @@
 #include "gsocketaddressenumerator.h"
 #include "gioerror.h"
 #include "gsocketconnectable.h"
+#include "gnetworking.h"
 
 #include <string.h>
 
--- glib-2.36.3/gio/gthreadedresolver.c.w2k	2013-08-25 20:20:56.956869228 +0200
+++ glib-2.36.3/gio/gthreadedresolver.c	2013-08-25 20:25:27.525989557 +0200
@@ -36,6 +36,7 @@
 #include "gtask.h"
 #include "gsocketaddress.h"
 #include "gsrvtarget.h"
+#include "gnetworking.h"
 
 
 G_DEFINE_TYPE (GThreadedResolver, g_threaded_resolver, G_TYPE_RESOLVER)
