Index: Makefile.in
--- Makefile.in.orig	2012-05-15 00:09:32.000000000 +0200
+++ Makefile.in	2012-07-13 20:35:15.000000000 +0200
@@ -426,7 +426,7 @@
 	gio-windows-2.0.pc.in
 TEST_PROGS = 
 ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
+SUBDIRS = . m4macros glib gmodule gthread gobject gio po
 DIST_SUBDIRS = $(SUBDIRS) build
 bin_SCRIPTS = glib-gettextize
 AM_CPPFLAGS = \
Index: configure
--- configure.orig	2012-05-15 00:09:26.000000000 +0200
+++ configure	2012-07-13 20:35:26.000000000 +0200
@@ -21276,12 +21276,6 @@
 
 
 
-if test "x$GCC" = "xyes"; then
-  case " $CFLAGS " in
-  *[\ \	]-Wall[\ \	]*) ;;
-  *) CFLAGS="$CFLAGS -Wall" ;;
-  esac
-fi
 
 if test "$glib_native_win32" = "yes"; then
   if test x$enable_static = xyes -a x$enable_shared = xyes; then
Index: gio/Makefile.in
--- gio/Makefile.in.orig	2012-05-15 00:09:29.000000000 +0200
+++ gio/Makefile.in	2012-07-13 20:35:15.000000000 +0200
@@ -482,7 +482,7 @@
 CTAGS = ctags
 am__tty_colors = \
 red=; grn=; lgn=; blu=; std=
-DIST_SUBDIRS = gdbus-2.0/codegen xdgmime inotify fen win32 . fam tests
+DIST_SUBDIRS = xdgmime inotify fen win32 . fam
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -760,8 +760,8 @@
 	gschema.dtd gconstructor_as_data.h $(NULL) $(completion_DATA)
 TEST_PROGS = 
 NULL = 
-SUBDIRS = gdbus-2.0/codegen $(am__append_1) $(am__append_4) \
-	$(am__append_8) $(am__append_11) . $(am__append_14) tests
+SUBDIRS = $(am__append_1) $(am__append_4) \
+	$(am__append_8) $(am__append_11) . $(am__append_14)
 @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = gio-2.0.lib
 @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
 @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
Index: gio/glib-compile-schemas.c
--- gio/glib-compile-schemas.c.orig	2012-04-13 15:39:41.000000000 +0200
+++ gio/glib-compile-schemas.c	2012-07-13 20:35:15.000000000 +0200
@@ -1530,7 +1530,7 @@
 }
 /* Text {{{2 */
 static void
-text (GMarkupParseContext  *context,
+XXXtext (GMarkupParseContext  *context,
       const gchar          *text,
       gsize                 text_len,
       gpointer              user_data,
@@ -1695,7 +1695,7 @@
 parse_gschema_files (gchar    **files,
                      gboolean   strict)
 {
-  GMarkupParser parser = { start_element, end_element, text };
+  GMarkupParser parser = { start_element, end_element, XXXtext };
   ParseState state = { 0, };
   const gchar *filename;
   GError *error = NULL;
Index: gio/tests/gdbus-peer.c
--- gio/tests/gdbus-peer.c.orig	2012-05-14 23:58:01.000000000 +0200
+++ gio/tests/gdbus-peer.c	2012-07-13 20:35:15.000000000 +0200
@@ -39,6 +39,8 @@
 #include <gio/gunixsocketaddress.h>
 #include <gio/gunixfdlist.h>
 
+#include <sys/socket.h>
+
 /* used in test_overflow */
 #ifdef G_OS_UNIX
 #include <gio/gunixconnection.h>
Index: gio/xdgmime/xdgmimecache.h
--- gio/xdgmime/xdgmimecache.h.orig	2011-08-16 02:51:30.000000000 +0200
+++ gio/xdgmime/xdgmimecache.h	2012-07-13 20:35:15.000000000 +0200
@@ -46,6 +46,9 @@
 #define _xdg_mime_cache_get_icon                      XDG_RESERVED_ENTRY(cache_get_icon)
 #define _xdg_mime_cache_get_generic_icon              XDG_RESERVED_ENTRY(cache_get_generic_icon)
 #define _xdg_mime_cache_glob_dump                     XDG_RESERVED_ENTRY(cache_glob_dump)
+#define _xdg_mime_cache_is_valid_mime_type            XDG_RESERVED_ENTRY(cache_is_valid_mime_type)
+#define _xdg_mime_cache_mime_type_equal               XDG_RESERVED_ENTRY(cache_mime_type_equal)
+#define _xdg_mime_cache_media_type_equal              XDG_RESERVED_ENTRY(cache_media_type_equal)
 #endif
 
 extern XdgMimeCache **_caches;
Index: glib/gatomic.c
--- glib/gatomic.c.orig	2012-03-12 01:42:41.000000000 +0100
+++ glib/gatomic.c	2012-07-13 20:35:15.000000000 +0200
@@ -21,6 +21,7 @@
 
 #include "config.h"
 
+#include "gthread.h"
 #include "gatomic.h"
 
 /**
Index: glib/gregex.c
--- glib/gregex.c.orig	2012-04-02 05:08:41.000000000 +0200
+++ glib/gregex.c	2012-07-13 20:35:15.000000000 +0200
@@ -228,8 +228,10 @@
     case PCRE_ERROR_DFA_RECURSE:
     case PCRE_ERROR_RECURSIONLIMIT:
       return _("recursion limit reached");
+#ifdef PCRE_ERROR_NULLWSLIMIT
     case PCRE_ERROR_NULLWSLIMIT:
       return _("workspace limit for empty substrings reached");
+#endif
     case PCRE_ERROR_BADNEWLINE:
       return _("invalid combination of newline flags");
     case PCRE_ERROR_BADOFFSET:
Index: gmodule/gmodule-dl.c
--- gmodule/gmodule-dl.c.orig	2011-08-16 02:51:30.000000000 +0200
+++ gmodule/gmodule-dl.c	2012-07-13 20:35:15.000000000 +0200
@@ -107,6 +107,7 @@
 static gpointer
 _g_module_self (void)
 {
+#ifndef __FreeBSD__
   gpointer handle;
   
   /* to query symbols from the program itself, special link options
@@ -118,6 +119,9 @@
     g_module_set_error (fetch_dlerror (TRUE));
   
   return handle;
+#else
+  return RTLD_DEFAULT;
+#endif
 }
 
 static void
