summaryrefslogtreecommitdiffstats
path: root/debian/patches/maxhostnamelen.patch
blob: af2bf1636a1c88e9ae4d20af498e7916a9dee284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 5ffb02dd0478b1ceb24dd356d0ccad7cb7ec728b Mon Sep 17 00:00:00 2001
From: Svante Signell <svante.signell@gmail.com>
Date: Fri, 5 Nov 2021 23:22:53 +0000
Subject: Define MAXHOSTNAMELEN on GNU/Hurd

Bug-Debian: https://bugs.debian.org/997030
Last-Update: 2021-11-05

Patch-Name: maxhostnamelen.patch
---
 defines.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/defines.h b/defines.h
index 279e509aa..7225cbfab 100644
--- a/defines.h
+++ b/defines.h
@@ -136,6 +136,12 @@ enum
 # endif
 #endif /* HOST_NAME_MAX */
 
+#ifndef MAXHOSTNAMELEN
+# if defined(_POSIX_HOST_NAME_MAX)
+#  define MAXHOSTNAMELEN _POSIX_HOST_NAME_MAX
+# endif
+#endif /* MAXHOSTNAMELEN */
+
 #if defined(HAVE_DECL_MAXSYMLINKS) && HAVE_DECL_MAXSYMLINKS == 0
 # define MAXSYMLINKS 5
 #endif