summaryrefslogtreecommitdiffstats
path: root/freebsd/dependencies/imlib/files/patch-PrintGifError.diff
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/dependencies/imlib/files/patch-PrintGifError.diff')
-rw-r--r--freebsd/dependencies/imlib/files/patch-PrintGifError.diff24
1 files changed, 24 insertions, 0 deletions
diff --git a/freebsd/dependencies/imlib/files/patch-PrintGifError.diff b/freebsd/dependencies/imlib/files/patch-PrintGifError.diff
new file mode 100644
index 000000000..6437515d6
--- /dev/null
+++ b/freebsd/dependencies/imlib/files/patch-PrintGifError.diff
@@ -0,0 +1,24 @@
+--- a/Imlib/load.c 2012-06-16 20:19:27.000000000 +0200
++++ b/Imlib/load.c 2012-06-16 20:19:56.000000000 +0200
+@@ -420,6 +420,21 @@
+ #endif /* HAVE_LIBTIFF */
+
+ #ifdef HAVE_LIBGIF
++
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
++static void PrintGifError(void) {
++#if GIFLIB_MAJOR >= 5
++ fprintf(stderr, "GIF-LIB error (exact reporting not implemented)\n");
++#else
++ const char * errorString = GifErrorString();
++ if (errorString)
++ fprintf(stderr, "GIF-LIB error: %s\n", errorString);
++ else
++ fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError());
++#endif
++}
++#endif
++
+ unsigned char *
+ _LoadGIF(ImlibData * id, FILE *f, int *w, int *h, int *t)
+ {