qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

webp fails to build against giflib >= 5.1.0 due to API change #209

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
5.1.0 changed DGifCloseFile() signature. See patch:

diff --git a/examples/gif2webp.c b/examples/gif2webp.c
index 135d9e1..f1e5223 100644
--- a/examples/gif2webp.c
+++ b/examples/gif2webp.c
@@ -645,7 +645,12 @@ int main(int argc, const char *argv[]) {
     DisplayGifError(gif, gif_error);
   }
   if (gif != NULL) {
+#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR >= 5) && (GIFLIB_MINOR >= 1)
+  // There was an API change in version 5.1.0.
+    DGifCloseFile(gif, &gif_error);
+#else
     DGifCloseFile(gif);
+#endif
   }

   return !ok;

Original issue reported on code.google.com by grizzly.nyo on 23 Jun 2014 at 6:25

GoogleCodeExporter commented 8 years ago
Thanks! This has been merged to 0.4.1, it will make it back to master later.

https://gerrit.chromium.org/gerrit/#/c/70956/

Original comment by jz...@google.com on 24 Jul 2014 at 2:21