aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/driftnet
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2015-11-13 02:35:53 +0800
committerantoine <antoine@FreeBSD.org>2015-11-13 02:35:53 +0800
commitd0f1ec94be6a99911f6cca042256e5988f348e2b (patch)
tree07ffa1194a060dd6c8f50a2046c9b422bc054830 /net-mgmt/driftnet
parente68f201aed7fe126d43c2e327bee9b8d651694ec (diff)
downloadfreebsd-ports-gnome-d0f1ec94be6a99911f6cca042256e5988f348e2b.tar.gz
freebsd-ports-gnome-d0f1ec94be6a99911f6cca042256e5988f348e2b.tar.zst
freebsd-ports-gnome-d0f1ec94be6a99911f6cca042256e5988f348e2b.zip
Allow building with giflib 5.1
PR: 204492
Diffstat (limited to 'net-mgmt/driftnet')
-rw-r--r--net-mgmt/driftnet/files/patch-gif.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/net-mgmt/driftnet/files/patch-gif.c b/net-mgmt/driftnet/files/patch-gif.c
index f50a8ad90a07..7a007d6eb44b 100644
--- a/net-mgmt/driftnet/files/patch-gif.c
+++ b/net-mgmt/driftnet/files/patch-gif.c
@@ -12,3 +12,27 @@
if (!I->us) {
I->err = IE_HDRFORMAT;
return 0;
+@@ -36,7 +40,11 @@ int gif_load_hdr(img I) {
+ * Abort loading a GIF file after the header is done.
+ */
+ int gif_abort_load(img I) {
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile((GifFileType*)I->us, NULL);
++#else
+ DGifCloseFile((GifFileType*)I->us);
++#endif
+ return 1;
+ }
+
+@@ -114,7 +122,11 @@ int gif_load_img(img I) {
+ ret = 1;
+ fail:
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(g, NULL);
++#else
+ DGifCloseFile(g);
++#endif
+
+ return ret;
+ }