1
--- a/gdk-pixbuf/gdk-pixbuf-io.c
2
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
3
@@ -303,8 +303,20 @@ gdk_pixbuf_get_module_file (void)
1
Index: gdk-pixbuf-2.21.7/gdk-pixbuf/gdk-pixbuf-io.c
2
===================================================================
3
--- gdk-pixbuf-2.21.7.orig/gdk-pixbuf/gdk-pixbuf-io.c 2010-07-10 02:52:30.000000000 +0200
4
+++ gdk-pixbuf-2.21.7/gdk-pixbuf/gdk-pixbuf-io.c 2010-09-10 15:41:29.312943754 +0200
4
6
gchar *result = g_strdup (g_getenv ("GDK_PIXBUF_MODULE_FILE"));
10
12
+#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
11
13
+# if defined (__i386__)
12
+ result = g_build_filename ("/usr", "lib32", "gdk-pixbuf-2.0", GDK_PIXBUF_BINARY_VERSION, "loaders.cache", NULL);
14
+ result = g_build_filename (GDK_PIXBUF_LIBDIR, "gdk-pixbuf-2.0", GDK_PIXBUF_BINARY_VERSION, "loaders.cache.32", NULL);
14
+ result = g_build_filename ("/usr", "lib64", "gdk-pixbuf-2.0", GDK_PIXBUF_BINARY_VERSION, "loaders.cache", NULL);
16
+ result = g_build_filename (GDK_PIXBUF_LIBDIR, "gdk-pixbuf-2.0", GDK_PIXBUF_BINARY_VERSION, "loaders.cache.64", NULL);
16
18
+ /* Prefer compat gdk-pixbuf.loaders file if it's usable. */
17
19
+ if (g_file_test(result, G_FILE_TEST_EXISTS))
26
--- a/gdk-pixbuf/queryloaders.c
27
+++ b/gdk-pixbuf/queryloaders.c
28
@@ -303,14 +303,28 @@ int main (int argc, char **argv)
32
+#if defined(__linux__) && defined(__i386__)
36
path = g_getenv ("GDK_PIXBUF_MODULEDIR");
38
if (path != NULL && *path != '\0')
39
path = g_locale_to_utf8 (path, -1, NULL, NULL, NULL);
41
- if (path == NULL || *path == '\0')
42
+ if (path == NULL || *path == '\0') {
43
+#if defined(__linux__) && defined(__i386__)
44
+ /* Prefer compat path first (i386 running on x86_64) */
45
+ tmp = g_build_filename ("/usr", "lib32", "gdk-pixbuf-2.0", GDK_PIXBUF_BINARY_VERSION, "loaders", NULL);
47
+ if (g_file_test (tmp, G_FILE_TEST_IS_DIR))
48
+ path = (const char *) tmp;
50
+ path = PIXBUF_LIBDIR;
56
g_string_append_printf (contents, "# LoaderDir = %s\n#\n", path);
58
@@ -327,6 +341,9 @@ int main (int argc, char **argv)
62
+#if defined(__linux__) && defined(__i386__)
66
g_string_append_printf (contents, "# dynamic loading of modules not supported\n");