mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUG/MINOR: init: set HAPROXY_STARTUP_VERSION from the variable, not the macro
This environment variable was added by commit d4c0be6b20
("MINOR: startup:
HAPROXY_STARTUP_VERSION contains the version used to start"). However, it's
set from the macro that is passed during the build process instead of being
set from the variable that's kept up to date in version.c. The difference
is visible only during debugging/bisecting because only changed files and
version.o are rebuilt, but not necessarily haproxy.o, which is where the
environment variable is set. This means that the version exposed in the
environment is not necessarily the same as the one presented in
"haproxy -v" during such debugging sessions.
This should be backported to 2.8. It has no impact at all on regularly
built binaries.
This commit is contained in:
parent
bfa493d4be
commit
9e61cf6790
@ -1303,7 +1303,7 @@ static void init_early(int argc, char **argv)
|
||||
char *tmp;
|
||||
int len;
|
||||
|
||||
setenv("HAPROXY_STARTUP_VERSION", HAPROXY_VERSION, 0);
|
||||
setenv("HAPROXY_STARTUP_VERSION", haproxy_version, 0);
|
||||
|
||||
/* First, let's initialize most global variables */
|
||||
totalconn = actconn = listeners = stopping = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user