package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / imlib2 / 0001-GIF-loader-Fix-for-libgif-version-5.patch
blobe39eb946f487d8dbbdc86413558764aadd70528d
1 From 17bf7bf95da6ed5b522205c321efcf838c48b13d Mon Sep 17 00:00:00 2001
2 From: Kim Woelders <kim@woelders.dk>
3 Date: Sun, 4 Aug 2013 08:05:27 +0200
4 Subject: [PATCH 1/5] GIF loader: Fix for libgif version 5.
6 ---
7 src/modules/loaders/loader_gif.c | 7 +++++++
8 1 file changed, 7 insertions(+)
10 diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c
11 index 23b8fd0..d1c2ae2 100644
12 --- a/src/modules/loaders/loader_gif.c
13 +++ b/src/modules/loaders/loader_gif.c
14 @@ -29,6 +29,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
15 /* already data in this image - dont load it again */
16 if (im->data)
17 return 0;
19 #ifndef __EMX__
20 fd = open(im->real_file, O_RDONLY);
21 #else
22 @@ -36,12 +37,18 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
23 #endif
24 if (fd < 0)
25 return 0;
27 +#if GIFLIB_MAJOR >= 5
28 + gif = DGifOpenFileHandle(fd, NULL);
29 +#else
30 gif = DGifOpenFileHandle(fd);
31 +#endif
32 if (!gif)
34 close(fd);
35 return 0;
40 if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
41 --
42 2.3.1