--- gio/ginetaddress.c.orig	2011-11-15 15:29:45.395000000 +0100
+++ gio/ginetaddress.c	2011-11-15 15:30:17.270000000 +0100
@@ -485,7 +485,7 @@ g_inet_address_new_loopback (GSocketFami
       return g_inet_address_new_from_bytes (addr, family);
     }
   else
-    return g_inet_address_new_from_bytes (in6addr_loopback.s6_addr, family);
+    return NULL;
 }
 
 /**
@@ -512,7 +512,7 @@ g_inet_address_new_any (GSocketFamily fa
       return g_inet_address_new_from_bytes (addr, family);
     }
   else
-    return g_inet_address_new_from_bytes (in6addr_any.s6_addr, family);
+    return NULL;
 }
 
 
--- gio/gwin32appinfo.c.orig	2011-11-15 17:40:47.254375000 +0100
+++ gio/gwin32appinfo.c	2011-11-15 16:17:09.988750000 +0100
@@ -33,7 +33,7 @@
 #include "glibintl.h"
 
 #include <windows.h>
-#include <shlwapi.h>
+// #include <shlwapi.h>
 
 
 #ifndef ASSOCF_INIT_BYEXENAME
--- gio/gthreadedresolver.c.orig	2012-04-20 14:21:24.406375000 +0200
+++ gio/gthreadedresolver.c	2012-04-20 14:21:37.656375000 +0200
@@ -34,6 +34,9 @@
 #include "gsimpleasyncresult.h"
 #include "gsocketaddress.h"
 
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
 G_DEFINE_TYPE (GThreadedResolver, g_threaded_resolver, G_TYPE_RESOLVER)
 
 static void threaded_resolver_thread (gpointer thread_data, gpointer pool_data);
*** glib/gutils.c.orig	2013-11-08 17:05:22.268266900 +0100
--- glib/gutils.c	2013-11-08 16:38:24.189718100 +0100
***************
*** 1867,1872 ****
--- 1867,1873 ----
    gchar **retval;
    gchar *p;
    gchar *exe_root;
+   gchar *xdg_data_dirs = (gchar *) g_getenv ("XDG_DATA_DIRS");
        
    if (address_of_function)
      {
***************
*** 1900,1906 ****
    p = get_special_folder (CSIDL_COMMON_DOCUMENTS);
    if (p)
      g_array_append_val (data_dirs, p);
! 	
    /* Using the above subfolders of Documents and Settings perhaps
     * makes sense from a Windows perspective.
     *
--- 1901,1920 ----
    p = get_special_folder (CSIDL_COMMON_DOCUMENTS);
    if (p)
      g_array_append_val (data_dirs, p);
! 
!   /* Add also XDG_DATA_DIRS */
!   if (xdg_data_dirs && xdg_data_dirs[0])
!     {
!       gchar **xdg_data_dir_vector = g_strsplit(xdg_data_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
!       const gchar *const *dir;
! 
!       for (dir = xdg_data_dir_vector; *dir; dir++)
!         {
! 	  g_array_append_val (data_dirs, *dir);
!         }
!       g_free (xdg_data_dir_vector);
!     }
! 
    /* Using the above subfolders of Documents and Settings perhaps
     * makes sense from a Windows perspective.
     *
*** gio/gdbusaddress.c.orig	Mon Jun 23 12:12:30 2014
--- gio/gdbusaddress.c	Mon Jun 23 15:45:12 2014
***************
*** 1132,1141 ****
  
  #ifdef G_OS_WIN32
  
! #define DBUS_DAEMON_ADDRESS_INFO "DBusDaemonAddressInfo"
! #define DBUS_DAEMON_MUTEX "DBusDaemonMutex"
! #define UNIQUE_DBUS_INIT_MUTEX "UniqueDBusInitMutex"
! #define DBUS_AUTOLAUNCH_MUTEX "DBusAutolaunchMutex"
  
  static void
  release_mutex (HANDLE mutex)
--- 1132,1165 ----
  
  #ifdef G_OS_WIN32
  
! /* The following variables store the name of various shared objects used
!  * by DBUS. Their content depends on the value of environment variable
!  * DBUS_SESSION_ID and they should be initialized using init_session_names. */
! static char DBUS_DAEMON_ADDRESS_INFO[1024];
! static char DBUS_DAEMON_MUTEX[1024];
! static char UNIQUE_DBUS_INIT_MUTEX[1024];
! static char DBUS_AUTOLAUNCH_MUTEX[1024];
! 
! /* Init the name of the various system shared objects that should be used by
!  * DBUS daemon */
! static void
! init_session_names(void)
! {
!   gchar *dbus_session_id = g_getenv("DBUS_SESSION_ID");
! 
!   strcpy(DBUS_DAEMON_ADDRESS_INFO, "DBusDaemonAddressInfo");
!   strcpy(DBUS_DAEMON_MUTEX, "DBusDaemonMutex");
!   strcpy(UNIQUE_DBUS_INIT_MUTEX, "UniqueDBusInitMutex");
!   strcpy(DBUS_AUTOLAUNCH_MUTEX, "DBusAutolaunchMutex");
! 
!   if (dbus_session_id)
!   {
!     strcat(DBUS_DAEMON_ADDRESS_INFO, (char *) dbus_session_id);
!     strcat(DBUS_DAEMON_MUTEX, (char *) dbus_session_id);
!     strcat(UNIQUE_DBUS_INIT_MUTEX, (char *) dbus_session_id);
!     strcat(DBUS_AUTOLAUNCH_MUTEX, (char *) dbus_session_id);
!   }
! }
  
  static void
  release_mutex (HANDLE mutex)
***************
*** 1332,1337 ****
--- 1356,1363 ----
    const char *address;
    GError *error = NULL;
  
+   init_session_names();
+ 
    if (g_getenv ("GDBUS_DAEMON_DEBUG") != NULL)
      open_console_window ();
  
***************
*** 1365,1370 ****
--- 1391,1397 ----
    char *address = NULL;
    wchar_t gio_path[MAX_PATH+1+200];
  
+   init_session_names();
    autolaunch_mutex = acquire_mutex (DBUS_AUTOLAUNCH_MUTEX);
  
    init_mutex = acquire_mutex (UNIQUE_DBUS_INIT_MUTEX);
