From b1a24cb018ac3a10b30ffd999e2e5b8a7da6d8ea Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Sun, 21 Apr 2013 13:55:08 +0200 Subject: Fixed build for giflib version >= 5.0; fixed issue #90 --- Makefile | 2 +- image.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cae679d..29484db 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = git-20130414 +VERSION = git-20130421 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man diff --git a/image.c b/image.c index 7e3329a..3230880 100644 --- a/image.c +++ b/image.c @@ -125,7 +125,11 @@ bool img_load_gif(img_t *img, const fileinfo_t *file) img->multi.cnt = 0; img->multi.sel = 0; +#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 + gif = DGifOpenFileName(file->path, NULL); +#else gif = DGifOpenFileName(file->path); +#endif if (gif == NULL) { warn("could not open gif file: %s", file->name); return false; -- cgit v1.2.3-54-g00ecf