From d9abc45ab53dbed31a5853087a7be21e804d9668 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 29 Oct 2021 20:20:46 +0200 Subject: [PATCH] * src/image.c: Fix building with giflib on MS-Windows. --- src/image.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/image.c b/src/image.c index 376a53e967..6ab9670e4b 100644 --- a/src/image.c +++ b/src/image.c @@ -8277,6 +8277,8 @@ DEF_DLL_FN (GifFileType *, DGifOpenFileName, (const char *)); # else DEF_DLL_FN (GifFileType *, DGifOpen, (void *, InputFunc, int *)); DEF_DLL_FN (GifFileType *, DGifOpenFileName, (const char *, int *)); +DEF_DLL_FN (int, DGifSavedExtensionToGCB, (GifFileType *, int, + GraphicsControlBlock *)); # endif # if HAVE_GIFERRORSTRING DEF_DLL_FN (char const *, GifErrorString, (int)); @@ -8294,6 +8296,9 @@ init_gif_functions (void) LOAD_DLL_FN (library, DGifSlurp); LOAD_DLL_FN (library, DGifOpen); LOAD_DLL_FN (library, DGifOpenFileName); +# if GIFLIB_MAJOR >= 5 + LOAD_DLL_FN (library, DGifSavedExtensionToGCB); +# endif # if HAVE_GIFERRORSTRING LOAD_DLL_FN (library, GifErrorString); # endif @@ -8304,12 +8309,14 @@ init_gif_functions (void) # undef DGifOpen # undef DGifOpenFileName # undef DGifSlurp +# undef DGifSavedExtensionToGCB # undef GifErrorString # define DGifCloseFile fn_DGifCloseFile # define DGifOpen fn_DGifOpen # define DGifOpenFileName fn_DGifOpenFileName # define DGifSlurp fn_DGifSlurp +# define DGifSavedExtensionToGCB fn_DGifSavedExtensionToGCB # define GifErrorString fn_GifErrorString # endif /* WINDOWSNT */ -- 2.30.2