forked from pool/emacs
fix build with giflib5 by skipping configure test and adding emacs-24.2-giflib5.patch OBS-URL: https://build.opensuse.org/request/show/158806 OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=110
29 lines
824 B
Diff
29 lines
824 B
Diff
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);
|