From a4059235cc5311c551c3d3a3961f7e0037530fee Mon Sep 17 00:00:00 2001 From: Francesco Giacomini Date: Tue, 1 Oct 2024 13:28:11 +0200 Subject: [PATCH] Explicly define NI_MAXHOST and NI_MAXSERV They should come with if the appropriate feature test macros are defined. But defining the right ones (e.g. _POSIX_C_SOURCE with value 200112L or even 200809L), ideally in configure.ac, requires more investigation, given that different macros are spread around the codebase. This change is aimed at quickly fixing the build on macOS. --- src/socklib/ipv6sock.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/socklib/ipv6sock.cc b/src/socklib/ipv6sock.cc index bac90a56..a165057b 100644 --- a/src/socklib/ipv6sock.cc +++ b/src/socklib/ipv6sock.cc @@ -29,6 +29,13 @@ # define _POSIX_SOURCE 1 #endif +#ifndef NI_MAXHOST +# define NI_MAXHOST 1025 +#endif +#ifndef NI_MAXSERV +# define NI_MAXSERV 32 +#endif + #include #include #include