about summary refs log tree commit diff
path: root/src/nix.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-04-08T14·05+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-04-08T14·05+0000
commitcc6eafb3d0a53c8bb02746411d3d41403ce9eb83 (patch)
treecdf6363fb09c229923a6d0e72106b6b9c5f68e11 /src/nix.cc
parentf7ef88df1fd6087deae02a53b8f18b64050f75db (diff)
* FreeBSD / gcc 2.95 compatibility fixes.
* A script to generate prebuilt registration scripts.

Diffstat (limited to 'src/nix.cc')
-rw-r--r--src/nix.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix.cc b/src/nix.cc
index 9e42917a49fe..9364baf6caa6 100644
--- a/src/nix.cc
+++ b/src/nix.cc
@@ -6,11 +6,12 @@
 #include <map>
 #include <cstdio>
 
+#include <errno.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#include <db4/db_cxx.h>
+#include <db_cxx.h>
 
 extern "C" {
 #include <aterm1.h>
@@ -48,9 +49,7 @@ public:
 
 auto_ptr<Db2> openDB(const string & dbname, bool readonly)
 {
-    auto_ptr<Db2> db;
-
-    db = auto_ptr<Db2>(new Db2(0, 0));
+    auto_ptr<Db2> db(new Db2(0, 0));
 
     db->open((nixHomeDir + "/var/nix/pkginfo.db").c_str(), dbname.c_str(),
         DB_HASH, readonly ? DB_RDONLY : DB_CREATE, 0666);