Package: efl / 1.8.6-2.5

giflib5.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Index: b/src/modules/evas/loaders/gif/evas_image_load_gif.c
===================================================================
--- a/src/modules/evas/loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c
@@ -528,7 +528,11 @@ evas_image_load_file_head_gif2(void *loa
    ret = EINA_TRUE;
 
 on_error: // jump here on any errors to clean up
+#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
+   if (gif) DGifCloseFile(gif, NULL);
+#else
    if (gif) DGifCloseFile(gif);
+#endif
    if (fi.map) eina_file_map_free(f, fi.map);
    return ret;
 }
@@ -607,7 +611,11 @@ open_file:
    if ((index > 0) && (index < loader->imgnum) &&
        (animated->animated > 1))
      {
+#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
+        if (loader->gif) DGifCloseFile(loader->gif, NULL);
+#else
         if (loader->gif) DGifCloseFile(loader->gif);
+#endif
         if ((loader->fi.map) && (loader->f))
           eina_file_map_free(loader->f, loader->fi.map);
         loader->gif = NULL;
@@ -765,7 +773,11 @@ open_file:
    loader->imgnum = imgnum;
    if ((animated->frame_count <= 1) || (rec == TERMINATE_RECORD_TYPE))
      {
+#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
+        if (loader->gif) DGifCloseFile(loader->gif, NULL);
+#else
         if (loader->gif) DGifCloseFile(loader->gif);
+#endif
         if ((loader->fi.map) && (loader->f))
           eina_file_map_free(loader->f, loader->fi.map);
         loader->gif = NULL;
@@ -849,7 +861,11 @@ static void
 evas_image_load_file_close_gif2(void *loader_data)
 {
    Loader_Info *loader = loader_data;
+#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
+   if (loader->gif) DGifCloseFile(loader->gif, NULL);
+#else
    if (loader->gif) DGifCloseFile(loader->gif);
+#endif
    if ((loader->fi.map) && (loader->f))
      eina_file_map_free(loader->f, loader->fi.map);
    free(loader);