From 140c10f9b6e45a9c6e18ec52a0ace68125ec654a Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 14 Mar 2023 19:22:06 +0100 Subject: [PATCH] [machdep] acknowledge that Linux is not POSIX-compliant --- share/libc/limits.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/libc/limits.h b/share/libc/limits.h index b5c0bb1ab27..161f09ae491 100644 --- a/share/libc/limits.h +++ b/share/libc/limits.h @@ -169,11 +169,12 @@ /* Maximum length of a host name (not including the terminating null) as returned from the gethostname() function. - Note: Mac OS does not define this constant. + Note: Mac OS does not define this constant, and Linux use a strictly smaller + one than what POSIX mandate */ #ifdef __FC_HOST_NAME_MAX # if __FC_HOST_NAME_MAX >= 0 - _Static_assert(__FC_HOST_NAME_MAX >=_POSIX_HOST_NAME_MAX, "__FC_HOST_NAME_MAX is too small (" expand(__FC_HOST_NAME_MAX) "): minimal value is " expand(_POSIX_HOST_NAME_MAX)); + // _Static_assert(__FC_HOST_NAME_MAX >=_POSIX_HOST_NAME_MAX, "__FC_HOST_NAME_MAX is too small (" expand(__FC_HOST_NAME_MAX) "): minimal value is " expand(_POSIX_HOST_NAME_MAX)); # define HOST_NAME_MAX __FC_HOST_NAME_MAX # else # undef HOST_NAME_MAX -- GitLab