summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-02-11 14:40:55 +0000
committergrant <grant@pkgsrc.org>2003-02-11 14:40:55 +0000
commit3833154e3f021bf94536a798a8cf69d224090a9d (patch)
tree828a43a60a1a27425999575428cc9b0e893279bc /pkgtools
parent262dd056adde59e67d04e690ee7e6309e57f7e8f (diff)
downloadpkgsrc-3833154e3f021bf94536a798a8cf69d224090a9d.tar.gz
belatedly sync with src:
In pkgdb_remove_pkg, only perform DB functions if HAVE_DBOPEN is defined, else return EXIT_SUCCESS unconditionally (as in other functions dealing with db functionality). fixes build problem on Solaris when no libdb is available.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/files/lib/pkgdb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgtools/pkg_install/files/lib/pkgdb.c b/pkgtools/pkg_install/files/lib/pkgdb.c
index e45d0b02091..4ccd12dda0c 100644
--- a/pkgtools/pkg_install/files/lib/pkgdb.c
+++ b/pkgtools/pkg_install/files/lib/pkgdb.c
@@ -1,9 +1,9 @@
-/* $NetBSD: pkgdb.c,v 1.5 2003/01/14 15:18:35 jschauma Exp $ */
+/* $NetBSD: pkgdb.c,v 1.6 2003/02/11 14:40:55 grant Exp $ */
#if 0
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: pkgdb.c,v 1.5 2003/01/14 15:18:35 jschauma Exp $");
+__RCSID("$NetBSD: pkgdb.c,v 1.6 2003/02/11 14:40:55 grant Exp $");
#endif
#endif
@@ -209,6 +209,7 @@ pkgdb_remove(const char *key)
/* remove any entry from the cache which has a data field of `pkg' */
int
pkgdb_remove_pkg(const char *pkg)
+#if defined(HAVE_DBOPEN)
{
DBT data;
DBT key;
@@ -239,6 +240,9 @@ pkgdb_remove_pkg(const char *pkg)
}
}
return ret;
+#else
+ return EXIT_SUCCESS;
+#endif /* HAVE_DBOPEN */
}
/*