summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-11-02 23:59:49 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2015-11-03 13:16:33 +0000
commit27d9366447c75ae8c2263ac49f6bd7327ed15ebe (patch)
tree8bfe48b5e184c8a229e2f2390c72dca2e3e65cef
parent98b98887f926be87eabccc7919e57ce625c63c03 (diff)
Radius: Change name of header file for RADIUSCLIENTNEW to match Fedora and (apparently) Gentoo.
Also include a hack to avoid a definition conflict between that Radius header and a DBM header. This work imported from Gentoo (more than one author).
-rw-r--r--src/src/auths/call_radius.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/src/auths/call_radius.c b/src/src/auths/call_radius.c
index 1201078dc..78ee466d8 100644
--- a/src/src/auths/call_radius.c
+++ b/src/src/auths/call_radius.c
@@ -8,6 +8,16 @@
/* 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
@@ -36,9 +46,14 @@ using its original API. At release 0.4.0 the API changed. */
#include <radlib.h>
#else
#if !defined(RADIUS_LIB_RADIUSCLIENT) && !defined(RADIUS_LIB_RADIUSCLIENTNEW)
- #define RADIUS_LIB_RADIUSCLIENT
+ # define RADIUS_LIB_RADIUSCLIENT
+ #endif
+
+ #ifdef RADIUS_LIB_RADIUSCLIENTNEW
+ # include <freeradius-client.h>
+ #else
+ # include <radiusclient.h>
#endif
- #include <radiusclient.h>
#endif