diff --git a/include/common/version.h b/include/common/version.h index 49427468c..248c22e23 100644 --- a/include/common/version.h +++ b/include/common/version.h @@ -66,9 +66,9 @@ #error "Must define CONFIG_HAPROXY_DATE" #endif -extern const char *haproxy_version; -extern const char *haproxy_date; -extern const char *stats_version_string; +extern char haproxy_version[]; +extern char haproxy_date[]; +extern char stats_version_string[]; #endif /* _COMMON_VERSION_H */ diff --git a/src/version.c b/src/version.c index f50f24bea..dae7b3df0 100644 --- a/src/version.c +++ b/src/version.c @@ -6,6 +6,10 @@ #include -const char *haproxy_version = HAPROXY_VERSION; -const char *haproxy_date = HAPROXY_DATE; -const char *stats_version_string = STATS_VERSION_STRING; +/* These ones are made variables and not constants so that they are stored into + * the data region and prominently appear in core files. + */ +char haproxy_version_here[] = "HAProxy version follows"; +char haproxy_version[] = HAPROXY_VERSION; +char haproxy_date[] = HAPROXY_DATE; +char stats_version_string[] = STATS_VERSION_STRING;