summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2021-08-28 12:05:32 +0200
committerWilly Tarreau <w@1wt.eu>2021-08-28 12:05:32 +0200
commit33056436c7a8cdf49fc080ccd3e3e8bd21eea26c (patch)
tree4d59f9b322914962468d5056187b2feb9af57ecb
parente15615c1ff5fac65f58849a768f8c7449f5dd968 (diff)
downloadhaproxy-33056436c7a8cdf49fc080ccd3e3e8bd21eea26c.tar.gz
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.
-rw-r--r--include/haproxy/defaults.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/haproxy/defaults.h b/include/haproxy/defaults.h
index e07ff324f..16058817e 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