SHA256
1
0
forked from pool/emacs
emacs/emacs-24.2-giflib5.patch

29 lines
824 B
Diff
Raw Normal View History

diff --git a/src/image.c b/src/image.c
index 73490fe..7acd5a3 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7176,7 +7176,11 @@ gif_load (struct frame *f, struct image *img)
}
/* Open the GIF file. */
+#if GIFLIB_MAJOR < 5
gif = fn_DGifOpenFileName (SSDATA (file));
+#else
+ gif = fn_DGifOpenFileName (SSDATA (file), NULL);
+#endif
if (gif == NULL)
{
image_error ("Cannot open `%s'", file, Qnil);
@@ -7197,7 +7201,11 @@ gif_load (struct frame *f, struct image *img)
memsrc.len = SBYTES (specified_data);
memsrc.index = 0;
+#if GIFLIB_MAJOR < 5
gif = fn_DGifOpen (&memsrc, gif_read_from_memory);
+#else
+ gif = fn_DGifOpen (&memsrc, gif_read_from_memory, NULL);
+#endif
if (!gif)
{
image_error ("Cannot open memory source `%s'", img->spec, Qnil);