pkgsrc/databases/cstore/patches/patch-al
wiz 401deb1bad Add a some missing header files and fix a cast.
Adapt for db4 update post 4.5.
Now dies with segfault during build:
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr
[1]   Abort trap (core dumped) ./cstoreqptest 0...
2011-12-20 13:42:47 +00:00

41 lines
861 B
Text

$NetBSD: patch-al,v 1.2 2011/12/20 13:42:47 wiz Exp $
--- src/Util/BDBFile.cpp.orig 2005-07-09 06:23:41.000000000 +0000
+++ src/Util/BDBFile.cpp
@@ -32,6 +32,7 @@
#include <fstream>
#include <sstream>
#include <string>
+#include <string.h>
#include <map>
#include <math.h>
#include <cassert>
@@ -275,6 +276,7 @@ void BDBFile::closeCursor()
void BDBFile::showStats()
{
+#if 0
DB_BTREE_STAT *pStat;
dbHandle->stat(&pStat, 0);
@@ -284,10 +286,12 @@ void BDBFile::showStats()
cout << bdbFileName << " contains "
<< pStat->bt_ndata << " records\n";
free(pStat);
+#endif
}
u_long BDBFile::getRecordCount()
{
+#if 0
DB_BTREE_STAT *pStat;
dbHandle->stat(&pStat, 0);
@@ -297,6 +301,7 @@ u_long BDBFile::getRecordCount()
u_long cnt = pStat->bt_ndata;
free(pStat);
return cnt;
+#endif
}
void BDBFile::dumpDB()