From: Nick Porter Date: Tue, 22 Dec 2020 11:45:25 +0000 (+0000) Subject: Add USE_DOUBLE_LIST to make file and setup for dpair.h X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03e93367d81783a0dc1e799523d67a3950d735ff;p=thirdparty%2Ffreeradius-server.git Add USE_DOUBLE_LIST to make file and setup for dpair.h --- diff --git a/Make.inc.in b/Make.inc.in index 31b1588348f..263f7ee4858 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -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@ diff --git a/src/lib/util/libfreeradius-util.mk b/src/lib/util/libfreeradius-util.mk index cc97a44a3f0..e11c9386052 100644 --- a/src/lib/util/libfreeradius-util.mk +++ b/src/lib/util/libfreeradius-util.mk @@ -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 \ diff --git a/src/lib/util/pair.h b/src/lib/util/pair.h index 3fbf09413c4..d5a32827471 100644 --- a/src/lib/util/pair.h +++ b/src/lib/util/pair.h @@ -21,6 +21,9 @@ * * @copyright 2015 The FreeRADIUS server project */ +#ifdef USE_DOUBLE_LIST +#include +#else RCSIDH(pair_h, "$Id$") #include @@ -418,3 +421,4 @@ void fr_pair_ctx_reset(fr_pair_ctx_t *pair_ctx, fr_dict_t const *dict); #ifdef __cplusplus } #endif +#endif