diff -Naur kdenetwork-4.9.4/kopete/protocols/wlm/wlmchatsession.cpp kdenetwork-4.9.4-giflib5/kopete/protocols/wlm/wlmchatsession.cpp --- kdenetwork-4.9.4/kopete/protocols/wlm/wlmchatsession.cpp 2012-11-30 01:32:44.000000000 +0100 +++ kdenetwork-4.9.4-giflib5/kopete/protocols/wlm/wlmchatsession.cpp 2012-12-21 14:29:19.626776830 +0100 @@ -467,11 +467,20 @@ { #ifdef HAVE_GIFLIB #ifdef HAVE_GIF_ERROR_STRING // giflib 4.2.0+ +#if GIFLIB_MAJOR >= 5 + int ErrorCode; + const char * errorString = GifErrorString(ErrorCode); +#else const char * errorString = GifErrorString(); +#endif if (errorString) fprintf(stderr, "GIF-LIB error: %s\n", errorString); else +#if GIFLIB_MAJOR >= 5 + fprintf(stderr, "GIF-LIB undefined error.\n"); +#else fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError()); +#endif #else // older giflib versions, libungif PrintGifError(); #endif // HAVE_GIF_ERROR_STRING @@ -489,12 +498,12 @@ ColorMapObject *imageColourmap; QImage img = ink.toImage().convertToFormat(QImage::Format_Indexed8); - imageColourmap= MakeMapObject(256, NULL); + imageColourmap= GifMakeMapObject(256, NULL); if (!imageColourmap) { return; } - screenColourmap= MakeMapObject(256, NULL); + screenColourmap= GifMakeMapObject(256, NULL); if (!screenColourmap) { return; } @@ -525,10 +534,15 @@ } } +#if GIFLIB_MAJOR >= 5 + int ErrorCode; + GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0, &ErrorCode); +#else GifFile= EGifOpenFileName(QFile::encodeName(filename).constData(), 0); +#endif if (!GifFile) { - FreeMapObject(imageColourmap); - FreeMapObject(screenColourmap); + GifFreeMapObject(imageColourmap); + GifFreeMapObject(screenColourmap); return; }