summaryrefslogtreecommitdiff
path: root/devel/kdesdk3/patches/patch-ad
blob: 678724d659c82cf9060991e437209740970fd2bd (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
$NetBSD: patch-ad,v 1.3 2005/01/02 21:59:23 markd Exp $

--- kbabel/kbabeldict/modules/dbsearchengine/database.cpp.orig	2005-01-03 00:39:59.000000000 +1300
+++ kbabel/kbabeldict/modules/dbsearchengine/database.cpp
@@ -728,7 +728,11 @@ int
 DataBaseManager::count ()
 {
     DB_BTREE_STAT *dstat = 0;
+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
+    db->stat (db, NULL, &dstat, DB_FAST_STAT);
+#else
     db->stat (db, &dstat, DB_FAST_STAT);
+#endif
     int ret = dstat->bt_nkeys;
     free (dstat);
 
@@ -963,8 +967,13 @@ DataBaseManager::loadInfo ()
     int nrec;
     DB_BTREE_STAT *stat;
 // memset(&stat,0,sizeof(DB_BTREE_STAT));
+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
+    if (infoDb->stat (infoDb, NULL, &stat, DB_FAST_STAT))
+        fprintf (stderr, "Cannot stat\n");
+#else
     if (infoDb->stat (infoDb, &stat, DB_FAST_STAT))
 	fprintf (stderr, "Cannot stat\n");
+#endif
     nrec = stat->bt_nkeys;
     free (stat);