--- corona-1.0.2/src/OpenGIF.cpp.orig 2015-06-22 20:57:06.941970178 +0200 +++ corona-1.0.2/src/OpenGIF.cpp 2015-06-22 20:58:51.143707746 +0200 @@ -20,7 +20,11 @@ COR_GUARD("OpenGIF"); // open GIF file +#if GIFLIB_MAJOR >= 5 + GifFileType* gif = DGifOpen(file, InputFunc, NULL); +#else GifFileType* gif = DGifOpen(file, InputFunc); +#endif if (!gif) { COR_LOG("DGifOpen failed"); return 0; @@ -29,7 +33,11 @@ // read GIF image if (DGifSlurp(gif) != GIF_OK) { COR_LOG("DGifSlurp failed"); +#if GIFLIB_MAJOR >= 5 + DGifCloseFile(gif, NULL); +#else DGifCloseFile(gif); +#endif return 0; } ColorMapObject* cmap = gif->SColorMap; @@ -50,7 +58,11 @@ COR_LOG(str); } +#if GIFLIB_MAJOR >= 5 + DGifCloseFile(gif, NULL); +#else DGifCloseFile(gif); +#endif return 0; } @@ -117,7 +129,11 @@ memcpy(out, in, width * height); } +#if GIFLIB_MAJOR >= 5 + DGifCloseFile(gif, NULL); +#else DGifCloseFile(gif); +#endif return new SimpleImage(width, height, PF_I8, image.release(), (byte*)palette.release(), 256, PF_R8G8B8A8); }