Krolyxon
Commit b901236

Branches

Refs →

nsxivb901236

Fix build with giflib >= 5.1.0.

Author
Bartłomiej Piotrowski
Date
2014-05-27 11:46 +0200
Committer
Bartłomiej Piotrowski · 2014-05-27 11:46 +0200
Parent
4cbc734
Commit
b901236261dc717dc08ed10f63e2d5cd3f3031f8

+4 −0

1 file changed

  1. M image.c +4 −0
M image.c View
@@ -278,7 +278,11 @@ bool img_load_gif(img_t *img, const fileinfo_t *file)
278278 }
279279 } while (rec != TERMINATE_RECORD_TYPE);
280280
281+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
282+ DGifCloseFile(gif, NULL);
283+#else
281284 DGifCloseFile(gif);
285+#endif
282286
283287 if (err && !file->loaded)
284288 warn("corrupted gif file: %s", file->name);