1Adjust source code to work with giflib 5.1x 2 3Downloaded patch for gif.c from 4https://projects.archlinux.org/svntogit/community.git/plain/trunk/giflib-5.1.patch?h=packages/fbv 5 6Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 7 8diff -wbBur fbv-1.0b/gif.c fbv-1.0b.my/gif.c 9--- fbv-1.0b/gif.c 2003-08-25 00:23:02.000000000 +0400 10+++ fbv-1.0b.my/gif.c 2014-05-29 18:39:41.337332872 +0400 11@@ -31,10 +31,10 @@ 12 #include <string.h> 13 #define min(a,b) ((a) < (b) ? (a) : (b)) 14 #define gflush return(FH_ERROR_FILE); 15-#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } 16-#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); } 17+#define grflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } 18+#define mgrflush { free(lb); free(slb); DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } 19 #define agflush return(FH_ERROR_FORMAT); 20-#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } 21+#define agrflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } 22 23 24 int fh_gif_id(char *name) 25@@ -81,7 +81,7 @@ 26 ColorMapObject *cmap; 27 int cmaps; 28 29- gft=DGifOpenFileName(name); 30+ gft=DGifOpenFileName(name, NULL); 31 if(gft==NULL){printf("err5\n"); gflush;} ////////// 32 do 33 { 34@@ -170,7 +170,7 @@ 35 } 36 } 37 while( rt!= TERMINATE_RECORD_TYPE ); 38- DGifCloseFile(gft); 39+ DGifCloseFile(gft, NULL); 40 return(FH_ERROR_OK); 41 } 42 43@@ -184,7 +184,7 @@ 44 int extcode; 45 GifRecordType rt; 46 47- gft=DGifOpenFileName(name); 48+ gft=DGifOpenFileName(name, NULL); 49 if(gft==NULL) gflush; 50 do 51 { 52@@ -197,7 +197,7 @@ 53 px=gft->Image.Width; 54 py=gft->Image.Height; 55 *x=px; *y=py; 56- DGifCloseFile(gft); 57+ DGifCloseFile(gft, NULL); 58 return(FH_ERROR_OK); 59 break; 60 case EXTENSION_RECORD_TYPE: 61@@ -210,7 +210,7 @@ 62 } 63 } 64 while( rt!= TERMINATE_RECORD_TYPE ); 65- DGifCloseFile(gft); 66+ DGifCloseFile(gft, NULL); 67 return(FH_ERROR_FORMAT); 68 } 69 #endif 70diff -uNr fbv-1.0b.org/configure fbv-1.0b/configure 71--- fbv-1.0b.org/configure 2004-09-07 13:29:27.000000000 +0200 72+++ fbv-1.0b/configure 2015-01-29 19:58:30.374599874 +0100 73@@ -106,9 +106,9 @@ 74 ungif="no" 75 echo "libungif check" >>./config.log 76 echo " 1st:" >>./config.log 77-$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs 78+$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lgif $libs 79 if [ -e \$\$~test ]; then 80- libs="-lungif $libs" ; ungif="yes" 81+ libs="-lgif $libs" ; ungif="yes" 82 else 83 echo " 2nd: -lX11 -L$xdir/lib" >>./config.log 84 $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs 85