summaryrefslogtreecommitdiff
path: root/network/driftnet/0001-Add-support-for-giflib-5.patch
blob: 7851b4e7b409854d6958ec61d0d86f1590dc1f0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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?= <david.sephirot@gmail.com>
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