File imlib2-giflib5.patch of Package imlib2
---
src/modules/loaders/loader_gif.c | 9 +++++++++
1 file changed, 9 insertions(+)
Index: imlib2-1.4.5/src/modules/loaders/loader_gif.c
===================================================================
--- imlib2-1.4.5.orig/src/modules/loaders/loader_gif.c
+++ imlib2-1.4.5/src/modules/loaders/loader_gif.c
@@ -7,6 +7,11 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <gif_lib.h>
+#if defined(GIFLIB_MAJOR)
+# if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
+# define DGifCloseFile(x) DGifCloseFile(x, NULL)
+# endif
+#endif
char
load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
@@ -40,7 +45,11 @@ load(ImlibImage * im, ImlibProgressFunct
#endif
if (fd < 0)
return 0;
+#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR >= 5)
+ gif = DGifOpenFileHandle(fd, NULL);
+#else
gif = DGifOpenFileHandle(fd);
+#endif
if (!gif)
{
close(fd);