aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/driftnet
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2015-11-12 18:35:53 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2015-11-12 18:35:53 +0000
commitc905c203db0c9756a47ecca2243013bfa462026d (patch)
tree07ffa1194a060dd6c8f50a2046c9b422bc054830 /net-mgmt/driftnet
parentf44de4a8d49fd8ce374780f235c163a9d3d9cd1a (diff)
downloadports-c905c203db0c9756a47ecca2243013bfa462026d.tar.gz
ports-c905c203db0c9756a47ecca2243013bfa462026d.zip
Allow building with giflib 5.1
PR: 204492
Notes
Notes: svn path=/head/; revision=401387
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;
+ }