opnsense-ports/mail/spamprobe/files/patch-src_parser_GifParser.cc
Franco Fichtner a4c7c24c83 */*: sync with upstream
Taken from: FreeBSD
2015-11-13 08:48:20 +01:00

26 lines
638 B
C++

--- src/parser/GifParser.cc.orig 2006-11-17 07:24:49 UTC
+++ src/parser/GifParser.cc
@@ -81,7 +81,11 @@ GifParser::GifParser(Message *message,
GifParser::~GifParser()
{
if (m_gif) {
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
+ DGifCloseFile(m_gif, NULL);
+#else
DGifCloseFile(m_gif);
+#endif
}
}
@@ -99,7 +103,11 @@ bool GifParser::parseImage()
void GifParser::openImage()
{
m_nextByteIndex = 0;
+#if GIFLIB_MAJOR >= 5
+ m_gif = DGifOpen(this, readFromBuffer, NULL);
+#else
m_gif = DGifOpen(this, readFromBuffer);
+#endif
if (!m_gif) {
throw runtime_error("open gif failed");
}