libmicrohttpd: build parallel
[feed/packages.git] / net / haproxy / patches / 0005-MINOR-config-extend-the-default-max-hostname-length-.patch
1 From e77015cdc18ab74aba61cdf57de56d06be5c2a4d Mon Sep 17 00:00:00 2001
2 From: Willy Tarreau <w@1wt.eu>
3 Date: Wed, 14 Jan 2015 11:48:58 +0100
4 Subject: [PATCH 05/10] MINOR: config: extend the default max hostname length
5 to 64 and beyond
6
7 Some users reported that the default max hostname length of 32 is too
8 short in some environments. This patch does two things :
9
10 - it relies on the system's max hostname length as found in MAXHOSTNAMELEN
11 if it is set. This is the most logical thing to do as the system libs
12 generally present the appropriate value supported by the system. This
13 value is 64 on Linux and 256 on Solaris, to give a few examples.
14
15 - otherwise it defaults to 64
16
17 It is still possible to override this value by defining MAX_HOSTNAME_LEN at
18 build time. After some observation time, this patch may be backported to
19 1.5 if it does not cause any build issue, as it is harmless and may help
20 some users.
21 (cherry picked from commit 75abcb3106e2c27ef983df885558cf94e01f717a)
22
23 Cc: Lukas Tribus <luky-37@hotmail.com>
24 Cc: jose.castro.leon@cern.ch
25
26 [wt: no issue reported so far and Jose rightfully asked for it in 1.5]
27 ---
28 include/common/defaults.h | 8 ++++++--
29 1 file changed, 6 insertions(+), 2 deletions(-)
30
31 diff --git a/include/common/defaults.h b/include/common/defaults.h
32 index 0075509..a191b8a 100644
33 --- a/include/common/defaults.h
34 +++ b/include/common/defaults.h
35 @@ -190,8 +190,12 @@
36
37 /* Maximum host name length */
38 #ifndef MAX_HOSTNAME_LEN
39 -#define MAX_HOSTNAME_LEN 32
40 -#endif
41 +#if MAXHOSTNAMELEN
42 +#define MAX_HOSTNAME_LEN MAXHOSTNAMELEN
43 +#else
44 +#define MAX_HOSTNAME_LEN 64
45 +#endif // MAXHOSTNAMELEN
46 +#endif // MAX_HOSTNAME_LEN
47
48 /* Maximum health check description length */
49 #ifndef HCHK_DESC_LEN
50 --
51 2.4.10
52