From 13582b4fe232a1dde0344c191974fb783f70d29c Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sun, 14 Nov 1999 23:03:45 +0000 Subject: [PATCH] Check for db1/ndbm.h and use it in db. Fixes #2647 --- ext/db/config.m4 | 2 ++ ext/db/db.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ext/db/config.m4 b/ext/db/config.m4 index a87dbef89d..319174dd51 100644 --- a/ext/db/config.m4 +++ b/ext/db/config.m4 @@ -4,6 +4,8 @@ dnl don't forget to call PHP_EXTENSION(db) divert(1) +AC_CHECK_HEADERS(db1/ndbm.h) + # Checks for libraries. # Prefer gdbm, Berkeley DB and ndbm/dbm, in that order AC_DEFUN(AC_PREFERRED_DB_LIB,[ diff --git a/ext/db/db.c b/ext/db/db.c index c246d6bf35..527e2c665b 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -79,8 +79,12 @@ #define DB_DBM_HSEARCH 1 #include #else +#ifdef HAVE_DB1_NDBM_H +#include +#else #include #endif +#endif #define DBM_TYPE DBM * #define DBM_MODE_TYPE int -- 2.40.0