From: Willy Tarreau Date: Sat, 28 Aug 2021 10:05:32 +0000 (+0200) Subject: BUILD/MINOR: defaults: eliminate warning on MAXHOSTNAMELEN with -Wundef X-Git-Tag: v2.5-dev5~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33056436c7a8cdf49fc080ccd3e3e8bd21eea26c;p=thirdparty%2Fhaproxy.git BUILD/MINOR: defaults: eliminate warning on MAXHOSTNAMELEN with -Wundef As reported in GH issue #1369, there is a single case of #if with a possibly undefined value in defaults.h which is on MAXHOSTNAMELEN. Let's turn it to a #ifdef. --- diff --git a/include/haproxy/defaults.h b/include/haproxy/defaults.h index e07ff324f9..16058817e6 100644 --- a/include/haproxy/defaults.h +++ b/include/haproxy/defaults.h @@ -284,7 +284,7 @@ /* Maximum host name length */ #ifndef MAX_HOSTNAME_LEN -#if MAXHOSTNAMELEN +#ifdef MAXHOSTNAMELEN #define MAX_HOSTNAME_LEN MAXHOSTNAMELEN #else #define MAX_HOSTNAME_LEN 64