diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-04-08 14:05:15 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-04-08 14:05:15 +0000 |
commit | cc6eafb3d0a53c8bb02746411d3d41403ce9eb83 (patch) | |
tree | cdf6363fb09c229923a6d0e72106b6b9c5f68e11 /src/nix.cc | |
parent | f7ef88df1fd6087deae02a53b8f18b64050f75db (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.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix.cc b/src/nix.cc index 9e42917a4..9364baf6c 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); |