]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: defaults: eliminate warning on MAXHOSTNAMELEN with -Wundef
authorWilly Tarreau <w@1wt.eu>
Sat, 28 Aug 2021 10:05:32 +0000 (12:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 28 Aug 2021 10:05:32 +0000 (12:05 +0200)
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.

include/haproxy/defaults.h

index e07ff324f9c73956b4f11a059319323c427efab7..16058817e63cdb0a21318be8efced63d079fdeca 100644 (file)
 
 /* Maximum host name length */
 #ifndef MAX_HOSTNAME_LEN
-#if MAXHOSTNAMELEN
+#ifdef MAXHOSTNAMELEN
 #define MAX_HOSTNAME_LEN       MAXHOSTNAMELEN
 #else
 #define MAX_HOSTNAME_LEN       64