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) {