summaryrefslogtreecommitdiff
path: root/community/ekg2/ekg2-0.3.1-giflib5.patch
blob: d11b1ecec01131fce98288a10bd16f2d084333b3 (plain)
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
diff -rupN a/plugins/gg/commands.c b/plugins/gg/commands.c
--- a/plugins/gg/commands.c	2011-03-17 18:08:11.000000000 +0100
+++ b/plugins/gg/commands.c	2013-08-31 11:31:42.521377436 +0200
@@ -1029,14 +1029,15 @@ static int token_gif_load (char *fname,
 	GifFileType *file;
 	int fd;
 	fd = open(fname, O_RDONLY);
+	int giferror;
 	if (fd == -1) {
 		snprintf(errbuf, sizeof(errbuf), "open(%s): %m", fname);
 		goto err;
 	}
 	
-	if (!(file = DGifOpenFileHandle(fd))) {
+	if (!(file = DGifOpenFileHandle(fd, giferror))) {
 		snprintf(errbuf, sizeof(errbuf), "DGifOpenFileHandle(): %d", 
-			GifLastError());
+			GifErrorString(giferror));
 		goto err2;
 	}
 
@@ -1046,7 +1047,7 @@ static int token_gif_load (char *fname,
 	}
 	
 	if (DGifSlurp(file) != GIF_OK) {
-		snprintf(errbuf, sizeof(errbuf), "DGifSlurp(): %d", GifLastError());
+		snprintf(errbuf, sizeof(errbuf), "DGifSlurp(): %d", GifErrorString(GIF_ERROR));
 		goto err3;
 	}