--- gtk+-2.10.11/acconfig.h-orig	2007-05-14 12:02:08.492348000 +0800
+++ gtk+-2.10.11/acconfig.h	2007-05-14 12:03:48.778302000 +0800
@@ -27,6 +27,8 @@
 #undef HAVE_PWD_H
 #undef HAVE_SHM_H
 #undef HAVE_STPCPY
+#undef HAVE_SYS_SYSINFO_H
+#undef HAVE_SYS_SYSTEMINFO_H
 #undef HAVE_XSHM_H
 #undef HAVE_SHAPE_EXT
 #undef HAVE_SOLARIS_XINERAMA
--- gtk+-2.10.11/configure.in-orig	2007-05-14 11:51:52.557398000 +0800
+++ gtk+-2.10.11/configure.in	2007-05-14 12:07:24.316427000 +0800
@@ -989,6 +989,9 @@ fi
 # Checks to see whether we should include mediaLib
 # support.
 #
+AC_CHECK_HEADER(sys/systeminfo.h, AC_DEFINE(HAVE_SYS_SYSTEMINFO_H))
+AC_CHECK_HEADER(sys/sysinfo.h, AC_DEFINE(HAVE_SYS_SYSINFO_H))
+
 AC_MSG_CHECKING(for mediaLib 2.3)
 use_mlib25=no
 # Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
--- gtk+-2.10.11/gdk-pixbuf/pixops/pixops.c-orig	2007-05-14 11:51:04.282372000 +0800
+++ gtk+-2.10.11/gdk-pixbuf/pixops/pixops.c	2007-05-14 12:11:03.115199000 +0800
@@ -85,11 +85,17 @@ typedef void (*PixopsPixelFunc)   (gucha
 #include <dlfcn.h>
 #include <mlib_image.h>
 
-#if defined (__sun)
+#ifdef HAVE_STRINGS_H
 #include <strings.h>
-#include <sys/systeminfo.h>
-#elif defined(__linux__)
+#endif
+
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
+
+#if defined(HAVE_SYS_SYSTEMINFO_H)
+#include <sys/systeminfo.h>
+#elif defined(HAVE_SYS_SYSINFO_H)
 #include <sys/sysinfo.h>
 #endif
 
--- gtk+-2.10.12/gdk/gdkmedialib.h-orig	2007-05-14 13:09:10.469284000 +0800
+++ gtk+-2.10.12/gdk/gdkmedialib.h	2007-05-14 13:10:05.023938000 +0800
@@ -28,23 +28,18 @@
 #ifndef __GDK_MEDIALIB_H__
 #define __GDK_MEDIALIB_H__
 
-#include <config.h>
-
 #ifdef USE_MEDIALIB
 #include <mlib_image.h>
 #include <mlib_video.h>
 
 #include <gdktypes.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
 
 gboolean _gdk_use_medialib (void);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
+
 #endif /* USE_MEDIALIB */
 #endif /* __GDK_MEDIALIB_H__ */
 
--- gtk+-2.10.12/gdk/gdkmedialib.c-orig	2007-05-14 13:09:06.725110000 +0800
+++ gtk+-2.10.12/gdk/gdkmedialib.c	2007-05-14 13:12:43.788801000 +0800
@@ -25,14 +25,22 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
+#include <config.h>
+
 #include <stdlib.h>
 #include <dlfcn.h>
-#include <link.h>
-#if defined (__sun)
+
+#ifdef HAVE_STRINGS_H
 #include <strings.h>
-#include <sys/systeminfo.h>
-#elif defined(__linux__)
+#endif
+
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
+
+#if defined(HAVE_SYS_SYSTEMINFO_H)
+#include <sys/systeminfo.h>
+#elif defined(HAVE_SYS_SYSINFO_H)
 #include <sys/sysinfo.h>
 #endif
 
