Fixes this issue not yet released: https://github.com/deiv/driftnet/issues/9 From d4b1f2522b39d70889084fa6b0968d3a68a206fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Su=C3=A1rez?= Date: Tue, 26 Jan 2016 20:20:20 +0100 Subject: [PATCH] Add support for "giflib 5" Thanks to Mathias Klose. --- src/display/gif.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/display/gif.c b/src/display/gif.c index ebe1db5..a86c78d 100644 --- a/src/display/gif.c +++ b/src/display/gif.c @@ -47,7 +47,11 @@ int gif_load_hdr(img I) { * Abort loading a GIF file after the header is done. */ int gif_abort_load(img I) { +#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 + DGifCloseFile((GifFileType*)I->us, NULL); +#else DGifCloseFile((GifFileType*)I->us); +#endif return 1; } @@ -125,7 +129,11 @@ int gif_load_img(img I) { ret = 1; fail: - DGifCloseFile(g); +#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 + DGifCloseFile(g, NULL); +#else + DGifCloseFile(g, NULL); +#endif return ret; } -- 2.9.0