Skip to content

Commit

Permalink
GIF input plug: Fix build with giflib>=5.1
Browse files Browse the repository at this point in the history
From giflib-5.1.0's NEWS:
"A small change to the API: DGifClose() and EGifClose() now take a
pointer-to-int second argument (like the corresponding openers)
where a diagnostic code will be deposited when they return
GIF_ERROR."
  • Loading branch information
heirecka committed Oct 14, 2014
1 parent 7a08a97 commit 576a9fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gif.imageio/gifinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ inline bool
GIFInput::close (void)
{
if (m_gif_file) {
#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
if (DGifCloseFile (m_gif_file, NULL) == GIF_ERROR) {
#else
if (DGifCloseFile (m_gif_file) == GIF_ERROR) {
#endif
error ("Error trying to close the file.");
return false;
}
Expand Down

0 comments on commit 576a9fc

Please sign in to comment.