wok view netatalk/stuff/netatalk-2.0.3-newer-db.patch @ rev 1540

wormux: hack compile_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 10 14:12:27 2008 +0000 (2008-10-10)
parents
children
line source
1 diff -urN netatalk-2.0.3.orig/bin/cnid/cnid_index.c netatalk-2.0.3/bin/cnid/cnid_index.c
2 --- netatalk-2.0.3.orig/bin/cnid/cnid_index.c 2005-04-10 12:49:18.000000000 +0000
3 +++ netatalk-2.0.3/bin/cnid/cnid_index.c 2007-08-11 17:01:38.000000000 +0000
4 @@ -1,5 +1,5 @@
5 /*
6 - * $Id: cnid_index.c,v 1.1.2.4 2005/04/10 12:49:18 didg Exp $
7 + * $Id: cnid_index.c,v 1.1.2.5 2005/09/13 16:57:44 didg Exp $
8 *
9 * All Rights Reserved. See COPYING.
10 */
11 @@ -274,7 +274,11 @@
12 DB_BTREE_STAT *sp;
13 DB *db = db_table[dbi].db;
15 +#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
16 + ret = db->stat(db, db_txn, &sp, 0);
17 +#else
18 ret = db->stat(db, &sp, 0);
19 +#endif
21 if (ret) {
22 LOG(log_error, logtype_cnid, "error getting stat infotmation on database: %s", db_strerror(errno));
23 diff -urN netatalk-2.0.3.orig/etc/cnid_dbd/dbif.c netatalk-2.0.3/etc/cnid_dbd/dbif.c
24 --- netatalk-2.0.3.orig/etc/cnid_dbd/dbif.c 2004-12-21 13:36:12.000000000 +0000
25 +++ netatalk-2.0.3/etc/cnid_dbd/dbif.c 2007-08-11 17:10:19.000000000 +0000
26 @@ -1,5 +1,5 @@
27 /*
28 - * $Id: dbif.c,v 1.1.4.15.2.1 2004/12/21 13:36:12 didg Exp $
29 + * $Id: dbif.c,v 1.1.4.15.2.2 2005/09/13 16:57:45 didg Exp $
30 *
31 * Copyright (C) Joerg Lenneis 2003
32 * All Rights Reserved. See COPYING.
33 @@ -514,7 +514,11 @@
34 DB_BTREE_STAT *sp;
35 DB *db = db_table[dbi].db;
37 +#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
38 + ret = db->stat(db, db_txn, &sp, 0);
39 +#else
40 ret = db->stat(db, &sp, 0);
41 +#endif
43 if (ret) {
44 LOG(log_error, logtype_cnid, "error getting stat infotmation on database: %s", db_strerror(errno));
45 diff -urN netatalk-2.0.3.orig/macros/db3-check.m4 netatalk-2.0.3/macros/db3-check.m4
46 --- netatalk-2.0.3.orig/macros/db3-check.m4 2004-08-11 03:01:11.000000000 +0000
47 +++ netatalk-2.0.3/macros/db3-check.m4 2007-08-11 16:57:02.000000000 +0000
48 @@ -1,4 +1,4 @@
49 -dnl $Id: db3-check.m4,v 1.11.6.9 2004/08/11 03:01:11 bfernhomberg Exp $
50 +dnl $Id: db3-check.m4,v 1.11.6.9.2.2 2006/09/09 01:36:39 didg Exp $
51 dnl Autoconf macros to check for the Berkeley DB library
54 @@ -111,7 +111,12 @@
55 CFLAGS="$savedcflags"
56 ])
58 -
59 +dnl I don't understand this stuff below
60 +dnl AFAIK it works for 4.1 and 4.2 and (4.3 xor 4.4)
61 +dnl you can have 4.2 and 4.3 installed
62 +dnl but If you have 4.3 and 4.4 it won't work with 4.3
63 +dnl only 4.4
64 +dnl didier
65 AC_DEFUN([NETATALK_BERKELEY_LINK],
66 [
67 atalk_cv_lib_db=no
68 @@ -119,6 +124,17 @@
69 NETATALK_BDB_LINK_TRY(atalk_cv_db_db42,[-ldb42])
70 NETATALK_BDB_LINK_TRY(atalk_cv_db_db_42,[-ldb-42])
71 NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_2,[-ldb-4-2])
72 +
73 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_2,[-ldb-4.4])
74 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db42,[-ldb44])
75 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db_42,[-ldb-44])
76 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_2,[-ldb-4-4])
77 +
78 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_2,[-ldb-4.3])
79 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db42,[-ldb43])
80 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db_42,[-ldb-43])
81 +NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_2,[-ldb-4-3])
82 +
83 NETATALK_BDB_LINK_TRY(atalk_cv_db_db_4_dot_1,[-ldb-4.1])
84 NETATALK_BDB_LINK_TRY(atalk_cv_db_db41,[-ldb41])
85 NETATALK_BDB_LINK_TRY(atalk_cv_db_db_41,[-ldb-41])
86 @@ -134,7 +150,7 @@
87 trybdbdir=""
88 dobdbsearch=yes
89 bdb_search_dirs="/usr/local/include /usr/include"
90 - search_subdirs="/db4.2 /db42 /db4.1 /db41 /db4 /"
91 + search_subdirs="/db4.2 /db42 /db4.3 /db43 /db4.4 /db44 /db4.1 /db41 /db4 /"
93 dnl required BDB version
94 DB_MAJOR_REQ=4