]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add USE_DOUBLE_LIST to make file and setup for dpair.h
authorNick Porter <nick@portercomputing.co.uk>
Tue, 22 Dec 2020 11:45:25 +0000 (11:45 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Jan 2021 23:05:49 +0000 (23:05 +0000)
Make.inc.in
src/lib/util/libfreeradius-util.mk
src/lib/util/pair.h

index 31b1588348fac2566371ca0e46bcb71d0a8d9754..263f7ee48588a0b9a1e9a35130ddb89b32f5dfb3 100644 (file)
@@ -165,6 +165,8 @@ $(error OPENSSL_LIBS must be define in order to use WITH_OPENSSL_*)
 endif
 endif
 
+CFLAGS += -DUSE_DOUBLE_LIST
+
 # Path to clang, setting this enables the 'scan.*' build targets
 # which perform static analysis on various server components.
 ANALYZE.c       := @clang_path@
index cc97a44a3f092e4e340e0a5cf76a30be96c291a2..e11c9386052a5ded90148331a08fba44c63593de 100644 (file)
@@ -42,8 +42,8 @@ SOURCES               := \
                   missing.c \
                   net.c \
                   packet.c \
-                  pair.c \
                   pair_legacy.c \
+                  $(if $(findstring USE_DOUBLE_LIST,$(CFLAGS)),dpair.c,pair.c) \
                   pair_print.c \
                   pair_tokenize.c \
                   paths.c \
index 3fbf09413c49979187613093e2729bba8f70e0cf..d5a3282747105500d2bb06d9c8f155a2979874c2 100644 (file)
@@ -21,6 +21,9 @@
  *
  * @copyright 2015 The FreeRADIUS server project
  */
+#ifdef USE_DOUBLE_LIST
+#include <freeradius-devel/util/dpair.h>
+#else
 RCSIDH(pair_h, "$Id$")
 
 #include <freeradius-devel/build.h>
@@ -418,3 +421,4 @@ void                fr_pair_ctx_reset(fr_pair_ctx_t *pair_ctx, fr_dict_t const *dict);
 #ifdef __cplusplus
 }
 #endif
+#endif