Permalink
Browse files

Fix compilation with gif_lib 5.1

  • Loading branch information...
gogglesguy authored and rouault committed Aug 19, 2015
1 parent f103b42 commit 0101157d4edd5d837d17356c66c7d25af7e020ac
Showing with 8 additions and 0 deletions.
  1. +8 −0 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;
}

0 comments on commit 0101157

Please sign in to comment.