From: Willy Tarreau Date: Thu, 6 May 2021 14:30:32 +0000 (+0200) Subject: MINOR: global: export the build features string list X-Git-Tag: v2.4-dev19~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0d3b732fb9641e4d47530381408354129462766;p=thirdparty%2Fhaproxy.git MINOR: global: export the build features string list Till now it was only presented in the version output but could not be consulted outside of haproxy.c, let's export it as a variable, and set it to an empty string if not defined. --- diff --git a/include/haproxy/global.h b/include/haproxy/global.h index 4231ba8294..bb32711a17 100644 --- a/include/haproxy/global.h +++ b/include/haproxy/global.h @@ -27,6 +27,7 @@ #include #include +extern const char *build_features; extern struct global global; extern int pid; /* current process id */ extern int relative_pid; /* process id starting at 1 */ diff --git a/src/haproxy.c b/src/haproxy.c index f149fc5cb1..79b3cc1781 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -148,6 +148,12 @@ DECLARE_INIT_STAGES; */ empty_t __read_mostly_align HA_SECTION("read_mostly") ALIGNED(64); +#ifdef BUILD_FEATURES +const char *build_features = BUILD_FEATURES; +#else +const char *build_features = ""; +#endif + /* list of config files */ static struct list cfg_cfgfiles = LIST_HEAD_INIT(cfg_cfgfiles); int pid; /* current process id */