Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 497550

Summary: media-libs/libextractor-1.0.1 - gif_extractor.c:75:3: error: too many arguments to function ‘DGifOpen’
Product: Gentoo Linux Reporter: Vladimir <v_2e>
Component: [OLD] LibraryAssignee: Samuli Suominen (RETIRED) <ssuominen>
Status: RESOLVED FIXED    
Severity: normal CC: net-p2p
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 338909, 451324    
Attachments: Complete build.log

Description Vladimir 2014-01-08 17:09:27 UTC
Created attachment 367406 [details]
Complete build.log

media-libs/libextractor-1.0.1 fails to build with the following error message:

gif_extractor.c: In function ‘EXTRACTOR_gif_extract_method’:
gif_extractor.c:75:3: error: too many arguments to function ‘DGifOpen’
   gif_file = DGifOpen (ec, &gif_read_func, &gif_error);
   ^
In file included from gif_extractor.c:27:0:
/usr/include/gif_lib.h:166:14: note: declared here
 GifFileType *DGifOpen(void *userPtr, InputFunc readFunc);    /* new one (TVT) *
              ^
Makefile:1839: recipe for target 'gif_extractor.lo' failed
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-08 17:15:46 UTC
Confirmed with =media-libs/giflib-4.2.3
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-06-05 00:40:43 UTC
Looks like this is fixed in 1.3 I've just added to Portage:

$ diff -ur libextractor-1.0.1/src/plugins/gif_extractor.c libextractor-1.3/src/plugins/gif_extractor.c 
--- libextractor-1.0.1/src/plugins/gif_extractor.c
+++ libextractor-1.3/src/plugins/gif_extractor.c
@@ -67,8 +67,10 @@
   GifByteType *ext;
   int et;
   char dims[128];
-/* GIFLIB >= 5.0 does not define GIF_LIB_VERSION anymore */
-#if !defined (GIF_LIB_VERSION)
+#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR <= 4
+  if (NULL == (gif_file = DGifOpen (ec, &gif_read_func)))
+    return; /* not a GIF */
+#else
   int gif_error;
   
   gif_error = 0;
@@ -79,9 +81,6 @@
       EGifCloseFile (gif_file);
     return; /* not a GIF */
   }
-#else
-  if (NULL == (gif_file = DGifOpen (ec, &gif_read_func)))
-    return; /* not a GIF */
 #endif
   if (0 !=
       ec->proc (ec->cls,