commit 0835bf10ee863d91a617270780cd79c405c6a992 from: Thomas Adam date: Thu Jun 22 13:33:52 2023 UTC portable: HOST_NAME_MAX On non-linux systems, as well as FreeBSD/MacOS, HOST_NAME_MAX isn't available. But it is defined a part of _SC, so we can use that. commit - 1fa75a87f7cf94849260387869faae04e32a6f2a commit + 0835bf10ee863d91a617270780cd79c405c6a992 blob - 68c02fe36df0f00abffe293ccae6d27b225b6297 blob + 40a66920a527a12077172e31ad7abb9ff943c01c --- include/got_compat2.h +++ include/got_compat2.h @@ -295,6 +295,10 @@ typedef struct _SHA2_CTX { /* SOCK_NONBLOCK isn't available across BSDs... */ #if !defined(SOCK_NONBLOCK) && !defined(__linux__) #define SOCK_NONBLOCK 00004000 +#endif + +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX _SC_HOST_NAME_MAX #endif #ifndef HAVE_ASPRINTF