--- old/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c 2015-06-03 01:30:33.073609050 +0100 +++ new/src/java.desktop/share/native/libsplashscreen/splashscreen_gif.c 2015-06-03 01:30:32.897612199 +0100 @@ -296,7 +296,13 @@ free(pBitmapBits); free(pOldBitmapBits); - DGifCloseFile(gif, NULL); +#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) + if (DGifCloseFile(gif, NULL) == GIF_ERROR) { + return 0; + } +#else + DGifCloseFile(gif); +#endif return 1; } @@ -304,7 +310,11 @@ int SplashDecodeGifStream(Splash * splash, SplashStream * stream) { +#if GIFLIB_MAJOR >= 5 GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, NULL); +#else + GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc); +#endif if (!gif) return 0;