summaryrefslogtreecommitdiffstats
path: root/package/ipsec-tools/ipsec-tools-0.6.7-printf-format-string.patch
blob: 5851737ca06e64fa3a6b5a613625562fef5b8172 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[patch]: ipsec-tools: fix printf format string for size_t

Use %zu instead of %d for printing out size_t variables. Fixes a build issue
on 64bit as ipsec-tools uses -Werror.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 src/racoon/algorithm.c |    6 +++---
 src/racoon/oakley.c    |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Index: ipsec-tools-0.6.7/src/racoon/oakley.c
===================================================================
--- ipsec-tools-0.6.7.orig/src/racoon/oakley.c
+++ ipsec-tools-0.6.7/src/racoon/oakley.c
@@ -252,7 +252,7 @@
 
 #ifdef ENABLE_STATS
 	gettimeofday(&end, NULL);
-	syslog(LOG_NOTICE, "%s(%s%d): %8.6f", __func__,
+	syslog(LOG_NOTICE, "%s(%s%zu): %8.6f", __func__,
 		s_attr_isakmp_group(dh->type), dh->prime->l << 3,
 		timedelta(&start, &end));
 #endif
@@ -299,7 +299,7 @@
 
 #ifdef ENABLE_STATS
 	gettimeofday(&end, NULL);
-	syslog(LOG_NOTICE, "%s(%s%d): %8.6f", __func__,
+	syslog(LOG_NOTICE, "%s(%s%zu): %8.6f", __func__,
 		s_attr_isakmp_group(dh->type), dh->prime->l << 3,
 		timedelta(&start, &end));
 #endif
Index: ipsec-tools-0.6.7/src/racoon/algorithm.c
===================================================================
--- ipsec-tools-0.6.7.orig/src/racoon/algorithm.c
+++ ipsec-tools-0.6.7/src/racoon/algorithm.c
@@ -394,7 +394,7 @@
 
 #ifdef ENABLE_STATS
 	gettimeofday(&end, NULL);
-	syslog(LOG_NOTICE, "%s(%s size=%d): %8.6f", __func__,
+	syslog(LOG_NOTICE, "%s(%s size=%zu): %8.6f", __func__,
 		f->name, buf->l, timedelta(&start, &end));
 #endif
 
@@ -506,7 +506,7 @@
 
 #ifdef ENABLE_STATS
 	gettimeofday(&end, NULL);
-	syslog(LOG_NOTICE, "%s(%s klen=%d size=%d): %8.6f", __func__,
+	syslog(LOG_NOTICE, "%s(%s klen=%zu size=%zu): %8.6f", __func__,
 		f->name, key->l << 3, buf->l, timedelta(&start, &end));
 #endif
 	return res;
@@ -535,7 +535,7 @@
 
 #ifdef ENABLE_STATS
 	gettimeofday(&end, NULL);
-	syslog(LOG_NOTICE, "%s(%s klen=%d size=%d): %8.6f", __func__,
+	syslog(LOG_NOTICE, "%s(%s klen=%zu size=%zu): %8.6f", __func__,
 		f->name, key->l << 3, buf->l, timedelta(&start, &end));
 #endif
 	return res;