diff options
author | Francois Andriot <francois.andriot@free.fr> | 2013-06-06 19:55:40 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-06-06 20:06:56 +0200 |
commit | 9d8e2d9127249e41e835b2ae3eda262d15cb136e (patch) | |
tree | 832c4b342590f467f796cb27ff3f31c067f7550d | |
parent | 6f3aa2abc4c9c91198d9c04c6a753f648f03283e (diff) | |
download | libksquirrel-3.5.13.2.tar.gz libksquirrel-3.5.13.2.zip |
Fix FTBFS with libgif >= 4.2.0v3.5.13.2
(cherry picked from commit 577f5c814d1ffc2b9c130d65096ffbdc98364208)
-rw-r--r-- | kernel/kls_gif/fmt_codec_gif.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/kls_gif/fmt_codec_gif.cpp b/kernel/kls_gif/fmt_codec_gif.cpp index 80f2dbb..fbdd818 100644 --- a/kernel/kls_gif/fmt_codec_gif.cpp +++ b/kernel/kls_gif/fmt_codec_gif.cpp @@ -39,6 +39,22 @@ extern "C" { #include "../xpm/codec_gif.xpm" +/* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */ +/* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */ +#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \ + ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4) +static void PrintGifError(void) +{ + char *Err = GifErrorString(); + + if (Err != NULL) { + fprintf(stderr, "\nGIF-LIB error: %s.\n", Err); + } else { + fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError()); + } +} +#endif + /* * * Originally designed to facilitate image transfer and online |