1 |
eras 13/03/01 10:58:26 |
2 |
|
3 |
Added: opendkim-2.8.0-berkeleydb.patch |
4 |
Log: |
5 |
Fix building with older versions of libdb |
6 |
|
7 |
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 mail-filter/opendkim/files/opendkim-2.8.0-berkeleydb.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/files/opendkim-2.8.0-berkeleydb.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/files/opendkim-2.8.0-berkeleydb.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: opendkim-2.8.0-berkeleydb.patch |
16 |
=================================================================== |
17 |
diff --git a/RELEASE_NOTES b/RELEASE_NOTES |
18 |
index 1233905..2567a63 100644 |
19 |
--- a/RELEASE_NOTES |
20 |
+++ b/RELEASE_NOTES |
21 |
@@ -3,6 +3,10 @@ |
22 |
This listing shows the versions of the OpenDKIM package, the date of |
23 |
release, and a summary of the changes in that release. |
24 |
|
25 |
+2.8.1 2013/0?/?? |
26 |
+ BUILD: Fix build for versions of libdb between 3.1 and 4.6. |
27 |
+ Problem noted by John Wood. |
28 |
+ |
29 |
2.8.0 2013/02/25 |
30 |
Feature request #SF2964383: Add DKIM_LIBFLAGS_STRICTRESIGN, which |
31 |
inhibits signing of a handle tagged for resigning when the |
32 |
diff --git a/configure.ac b/configure.ac |
33 |
index ff018de..64d567a 100644 |
34 |
--- a/configure.ac |
35 |
+++ b/configure.ac |
36 |
@@ -14,7 +14,7 @@ AC_PREREQ(2.61) |
37 |
# |
38 |
m4_define([VERSION_RELEASE], 2) |
39 |
m4_define([VERSION_MAJOR_REV], 8) |
40 |
-m4_define([VERSION_MINOR_REV], 0) |
41 |
+m4_define([VERSION_MINOR_REV], 1) |
42 |
m4_define([VERSION_PATCH], 0) |
43 |
|
44 |
# |
45 |
diff --git a/libopendkim/dkim-cache.c b/libopendkim/dkim-cache.c |
46 |
index 1bb10e8..c43cc0c 100644 |
47 |
--- a/libopendkim/dkim-cache.c |
48 |
+++ b/libopendkim/dkim-cache.c |
49 |
@@ -508,7 +508,13 @@ dkim_cache_stats(DB *db, u_int *queries, u_int *hits, u_int *expired, |
50 |
#if DB_VERSION_CHECK(2,0,0) |
51 |
DB_HASH_STAT *sp; |
52 |
|
53 |
+# if DB_VERSION_CHECK(4,3,0) |
54 |
if (db->stat(db, NULL, (void *) &sp, 0) != 0) |
55 |
+# elif DB_VERSION_CHECK(4,0,0) |
56 |
+ if (db->stat(db, (void *) &sp, 0) != 0) |
57 |
+# else /* DB_VERSION_CHECK(4,0,0) */ |
58 |
+ if (db->stat(db, (void *) &sp, NULL, 0) != 0) |
59 |
+# endif /* DB_VERSION_CHECK(4,0,0) */ |
60 |
{ |
61 |
*keys = (u_int) -1; |
62 |
} |
63 |
diff --git a/libopendkim/tests/t-test49.c b/libopendkim/tests/t-test49.c |
64 |
index e54cb37..318ad8a 100644 |
65 |
--- a/libopendkim/tests/t-test49.c |
66 |
+++ b/libopendkim/tests/t-test49.c |
67 |
@@ -53,7 +53,7 @@ main(int argc, char **argv) |
68 |
|
69 |
int status; |
70 |
int err; |
71 |
- u_int s1, s2, s3; |
72 |
+ u_int s1, s2, s3, s4; |
73 |
size_t buflen; |
74 |
DB *cache; |
75 |
char buf[BUFRSZ + 1]; |
76 |
@@ -99,10 +99,11 @@ main(int argc, char **argv) |
77 |
assert(status == 1); |
78 |
|
79 |
printf("--- retrieve cache stats\n"); |
80 |
- dkim_cache_stats(&s1, &s2, &s3); |
81 |
+ dkim_cache_stats(cache, &s1, &s2, &s3, &s4, FALSE); |
82 |
assert(s1 == 3); |
83 |
assert(s2 == 1); |
84 |
assert(s3 == 1); |
85 |
+ assert(s4 == 0); |
86 |
|
87 |
dkim_cache_close(cache); |
88 |
#endif /* ! QUERY_CACHE */ |