summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-03-19 17:18:30 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2022-03-19 17:56:26 +0000
commit3a03e18340fd94cad88d0edeedc383aad2d107a3 (patch)
treef2be067faa7da51ab1e55ea2ab797318436b6605
parent06f765450c70d1abcf13fbfbbd17cfc00e0ba02a (diff)
downloadexim4-3a03e18340fd94cad88d0edeedc383aad2d107a3.tar.gz
BDB: specific build-time error for version 1 library
Broken-by: 990ba85353
-rw-r--r--src/src/auths/call_radius.c31
-rw-r--r--src/src/dbstuff.h2
2 files changed, 13 insertions, 20 deletions
diff --git a/src/src/auths/call_radius.c b/src/src/auths/call_radius.c
index 1c048923e..8a3195cc1 100644
--- a/src/src/auths/call_radius.c
+++ b/src/src/auths/call_radius.c
@@ -9,16 +9,6 @@
/* This file was originally supplied by Ian Kirk. The libradius support came
from Alex Kiernan. */
-/* ugly hack to work around redefinition of ENV by radiusclient.h and
- * db.h: define _DB_H_ so the db.h include thinks it's already included,
- * we can get away with it like this, since this file doesn't use any db
- * functions. */
-#ifndef _DB_H_
-# define _DB_H_ 1
-# define _DB_EXT_PROT_IN_ 1
-# define DB void
-#endif
-
#include "../exim.h"
/* This module contains functions that call the Radius authentication
@@ -44,17 +34,18 @@ static void dummy(int x) { dummy2(x-1); }
using its original API. At release 0.4.0 the API changed. */
#ifdef RADIUS_LIB_RADLIB
- #include <radlib.h>
+# include <radlib.h>
#else
- #if !defined(RADIUS_LIB_RADIUSCLIENT) && !defined(RADIUS_LIB_RADIUSCLIENTNEW)
- # define RADIUS_LIB_RADIUSCLIENT
- #endif
-
- #ifdef RADIUS_LIB_RADIUSCLIENTNEW
- # include <freeradius-client.h>
- #else
- # include <radiusclient.h>
- #endif
+# if !defined(RADIUS_LIB_RADIUSCLIENT) && !defined(RADIUS_LIB_RADIUSCLIENTNEW)
+# define RADIUS_LIB_RADIUSCLIENT
+# endif
+
+# ifdef RADIUS_LIB_RADIUSCLIENTNEW
+# define ENV FREERADIUSCLIENT_ENV /* Avoid clash with Berkeley DB */
+# include <freeradius-client.h>
+# else
+# include <radiusclient.h>
+# endif
#endif
diff --git a/src/src/dbstuff.h b/src/src/dbstuff.h
index 510fe4f36..8ebf6f6e4 100644
--- a/src/src/dbstuff.h
+++ b/src/src/dbstuff.h
@@ -300,6 +300,8 @@ before use, but we don't have to free anything after reading data. */
# else /* DB_VERSION_MAJOR >= 3 */
# error Berkeley DB versions earlier than 3 are not supported */
# endif /* DB_VERSION_MAJOR */
+# else
+# error Berkeley DB version 1 is no longer supported
# endif /* DB_VERSION_STRING */