summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch')
-rw-r--r--sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch b/sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch
new file mode 100644
index 000000000000..1fa7710de0bc
--- /dev/null
+++ b/sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch
@@ -0,0 +1,35 @@
+From 0101157d4edd5d837d17356c66c7d25af7e020ac Mon Sep 17 00:00:00 2001
+From: Sander Jansen <s.jansen@gmail.com>
+Date: Wed, 19 Aug 2015 16:51:13 -0500
+Subject: [PATCH] Fix compilation with gif_lib 5.1
+
+---
+ mapimageio.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/mapimageio.c b/mapimageio.c
+index e6bdcb5..5eed924 100644
+--- a/mapimageio.c
++++ b/mapimageio.c
+@@ -1058,6 +1058,13 @@ int readGIF(char *path, rasterBufferObj *rb)
+
+ } while (recordType != TERMINATE_RECORD_TYPE);
+
++
++#if defined GIFLIB_MAJOR && GIFLIB_MINOR && ((GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) || (GIFLIB_MAJOR > 5))
++ if (DGifCloseFile(image, &errcode) == GIF_ERROR) {
++ msSetError(MS_MISCERR,"failed to close gif after loading: %s","readGIF()", gif_error_msg(errcode));
++ return MS_FAILURE;
++ }
++#else
+ if (DGifCloseFile(image) == GIF_ERROR) {
+ #if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
+ msSetError(MS_MISCERR,"failed to close gif after loading: %s","readGIF()", gif_error_msg(image->Error));
+@@ -1066,6 +1073,7 @@ int readGIF(char *path, rasterBufferObj *rb)
+ #endif
+ return MS_FAILURE;
+ }
++#endif
+
+ return MS_SUCCESS;
+ }