1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

Allow building with giflib 5.1

PR:		204492
This commit is contained in:
Antoine Brodin 2015-11-12 15:28:50 +00:00
parent c4ec93d6b6
commit da2451d1ae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=401358

View File

@ -120,11 +120,16 @@
exit(-1);
}
}
@@ -180,7 +229,11 @@ gifLoad(fullname, name, verbose)
@@ -179,8 +228,16 @@ gifLoad(fullname, name, verbose)
pixline[x] = GifRow[x];
}
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
+ if (DGifCloseFile(GifFile, NULL) == GIF_ERROR) {
+#else
if (DGifCloseFile(GifFile) == GIF_ERROR) {
- PrintGifError();
+#endif
+#if GIFLIB_MAJOR >= 5
+ localPrintGifError(GifFile->Error);
+#else
@ -133,7 +138,7 @@
exit(-1);
}
@@ -196,7 +249,11 @@ gifIdent(fullname, name)
@@ -196,11 +253,19 @@ gifIdent(fullname, name)
GifFileType *gifp;
int ret;
@ -145,3 +150,11 @@
if (gifp == NULL)
ret = 0;
else {
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
+ DGifCloseFile(gifp, NULL);
+#else
DGifCloseFile(gifp);
+#endif
tellAboutImage(name);
ret = 1;
}