From 5bb6b77e988056debfbdf68e053a6227ded9b8f9 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Sun, 25 Oct 2026 19:58:04 +0100 Subject: [PATCH] Use AF_UNSPEC for the getaddrinfo() hints network.c defines _POSIX_C_SOURCE before pulling in the socket headers. On FreeBSD that hides the non-standard PF_* aliases from , so PF_UNSPEC is undeclared and the build fails: src/common/network.c:169:20: error: use of undeclared identifier 'PF_UNSPEC' getaddrinfo() is specified in terms of the AF_* constants anyway, and the rest of the file already uses AF_INET, so use AF_UNSPEC here too. --- src/common/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/network.c b/src/common/network.c index 8892b3e5..54ef749d 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -166,7 +166,7 @@ net_resolve (netstore * ns, char *hostname, int port, char **real_host) sprintf (portstring, "%d", port); memset (&hints, 0, sizeof (struct addrinfo)); - hints.ai_family = PF_UNSPEC; /* support ipv6 and ipv4 */ + hints.ai_family = AF_UNSPEC; /* support ipv6 and ipv4 */ hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG; hints.ai_socktype = SOCK_STREAM;