summaryrefslogblamecommitdiff
path: root/user/elogind/hostname-length.patch
blob: 738f3573d67a58220cc5cd9ece1a447b04db5b40 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                                              
musl defines HOST_NAME_MAX to 255, even though a nodename in Linux can only
be 64 characters in length.  Use the literal value instead of <limits.h>.

--- elogind-252.9/src/basic/hostname-util.c.old	2023-05-15 06:35:29.000000000 -0500
+++ elogind-252.9/src/basic/hostname-util.c	2023-11-27 06:45:02.637584076 -0600
@@ -128,8 +128,8 @@
         if (hyphen)
                 return false;
 
-        if (p-s > HOST_NAME_MAX) /* Note that HOST_NAME_MAX is 64 on Linux, but DNS allows domain names up to
-                                  * 255 characters */
+        if (p-s > 64) /* Note that HOST_NAME_MAX is 64 on Linux, but DNS allows domain names up to
+                       * 255 characters */
                 return false;
 
         return true;