From cf22f78ff6ead2b1f022d7e7367daedf459aa355 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Mon, 21 Dec 2020 00:21:13 +0100 Subject: [PATCH] libcody: Include as needed libcody as originally added to GCC fail to build on *-unknown-freebsd11.4 and presumably others: c++ -std=c++11 -g -include config.h -I ... -MMD -MP -MF netclient.d -c -o netclient.o .../libcody/netclient.cc:114:3: error: unknown type sockaddr_in6 addr; ^~~~~~~~~~~~ sockaddr_in6 is declared in /usr/include/netinet6/in6.h, which is included by /usr/include/netinet/in.h. Indeed, per https://man7.org/linux/man-pages/man7/ipv6.7.html #include #include should be included, and our own gcc/ada/gsocket.h also has #if !(defined (VMS) || defined (__MINGW32__)) #include #include #include : #endif libcody/ChangeLog: 2020-12-21 Gerald Pfeifer * netserver.cc: Include . --- libcody/netserver.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/libcody/netserver.cc b/libcody/netserver.cc index 7e43eb033f4..30202c5106a 100644 --- a/libcody/netserver.cc +++ b/libcody/netserver.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include #ifndef AI_NUMERICSERV