From f0140254c269ff1e9b03598be05acaf9073db13b Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Mon, 16 Aug 1999 12:29:14 +0000 Subject: [PATCH] protect from db-less systems git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6822 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/getcap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/roken/getcap.c b/lib/roken/getcap.c index 919c4a969..fe5e89ac9 100644 --- a/lib/roken/getcap.c +++ b/lib/roken/getcap.c @@ -44,7 +44,9 @@ RCSID("$Id$"); #include #include +#ifdef HAVE_DB_H #include +#endif #include #include #include @@ -275,6 +277,9 @@ getent(char **cap, size_t *len, char **db_array, int fd, if (fd >= 0) { (void)lseek(fd, (off_t)0, SEEK_SET); } else { +#ifndef HAVE_DBOPEN +#define dbopen(a, b, c, d, e) NULL +#endif (void)snprintf(pbuf, sizeof(pbuf), "%s.db", *db_p); if ((capdbp = dbopen(pbuf, O_RDONLY, 0, DB_HASH, 0)) != NULL) {