summaryrefslogtreecommitdiff
path: root/app-text/sdcv/files/sdcv-0.4.2-missing-headers.patch
blob: 8c96c65fa93be3d7a392997e314e4e2e062d2120 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff -ur sdcv-0.4.2-orig/src/lib/lib.cpp sdcv-0.4.2/src/lib/lib.cpp
--- sdcv-0.4.2-orig/src/lib/lib.cpp	2009-07-25 17:44:48.000000000 -0400
+++ sdcv-0.4.2/src/lib/lib.cpp	2009-07-25 17:39:11.000000000 -0400
@@ -517,7 +517,7 @@
 {
 	fseek(idxfile, wordoffset[page_idx], SEEK_SET);
 	guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx];
-	fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
+	fread(wordentry_buf, std::min(sizeof(wordentry_buf), (size_t)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255.
 	return wordentry_buf;
 }
 
diff -ur sdcv-0.4.2-orig/src/libwrapper.cpp sdcv-0.4.2/src/libwrapper.cpp
--- sdcv-0.4.2-orig/src/libwrapper.cpp	2009-07-25 17:44:48.000000000 -0400
+++ sdcv-0.4.2/src/libwrapper.cpp	2009-07-25 17:39:11.000000000 -0400
@@ -24,6 +24,7 @@
 
 #include <glib/gi18n.h>
 #include <map>
+#include <cstring>
 
 #include "utils.hpp"
 
diff -ur sdcv-0.4.2-orig/src/readline.cpp sdcv-0.4.2/src/readline.cpp
--- sdcv-0.4.2-orig/src/readline.cpp	2009-07-25 17:44:48.000000000 -0400
+++ sdcv-0.4.2/src/readline.cpp	2009-07-25 17:39:11.000000000 -0400
@@ -23,6 +23,7 @@
 #endif
 
 #include <cstdio>
+#include <cstdlib>
 #ifdef WITH_READLINE
 #  include <readline/readline.h>
 #  include <readline/history.h>
diff -ur sdcv-0.4.2-orig/src/utils.cpp sdcv-0.4.2/src/utils.cpp
--- sdcv-0.4.2-orig/src/utils.cpp	2009-07-25 17:44:48.000000000 -0400
+++ sdcv-0.4.2/src/utils.cpp	2009-07-25 17:44:17.000000000 -0400
@@ -22,6 +22,8 @@
 #  include "config.h"
 #endif
 
+#include <cstdio>
+#include <cstdlib>
 #include <glib.h>
 #include <glib/gi18n.h>
 
Only in sdcv-0.4.2/src: utils.o