java-1_8_0-openjdk/system-giflib5.patch

22 lines
568 B
Diff

--- jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
+++ jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
@@ -316,9 +316,18 @@
int
SplashDecodeGifStream(Splash * splash, SplashStream * stream)
{
+#ifdef GIFLIB_MAJOR >= 5
+ int error = 0;
+ GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, &error);
+
+ if (error)
+ return 0;
+#else
GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc);
if (!gif)
return 0;
+#endif
+
return SplashDecodeGif(splash, gif);
}