From b09f3b3c284e44e222419f89044aedfd7fcb0ac2 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 3 Sep 2024 12:50:11 -0400 Subject: [PATCH] otp: prevent implicit function declarations if HAVE_DB_NDBM include ndbm.h if HAVE_DB_NDBM is defined to avoid implicit function declarations. --- lib/otp/otp_db.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/otp/otp_db.c b/lib/otp/otp_db.c index c7b2b763a..036359c1d 100644 --- a/lib/otp/otp_db.c +++ b/lib/otp/otp_db.c @@ -38,10 +38,13 @@ RCSID("$Id$"); #include "otp_locl.h" -#if !defined(HAVE_NDBM) && !defined(HAVE_DB_NDBM) -#include "ndbm_wrap.h" +#if defined(HAVE_DB_NDBM) +# include +#elif !defined(HAVE_NDBM) +# include "ndbm_wrap.h" #endif + #define RETRIES 5 void *