Message ID | 20201220232904.58E7233E5E@hamza.pair.com |
---|---|
State | New |
Headers | show |
Series | [fix,bootstrap] libcody: Include <netinet/in.h> as needed | expand |
On 21/12/2020 00:28, Gerald Pfeifer wrote: > libcody as originally added to GCC fails to build on *-unknown-freebsd11.4 > and presumably others: I experienced the same issue with FreeBSD 12 building a cross-compiler.
On 12/20/20 6:28 PM, Gerald Pfeifer wrote: > libcody as originally added to GCC fails 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; > ^~~~~~~~~~~~ > That should be fixed now
On Mon, 21 Dec 2020, Nathan Sidwell wrote: > On 12/20/20 6:28 PM, Gerald Pfeifer wrote: >> libcody as originally added to GCC fails 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; >> ^~~~~~~~~~~~ > That should be fixed now libcody/netclient.cc is indeed fixed, after commit 31705b068fa5d6cbd04aa4ac5f5275bad37d2222 Author: Nathan Sidwell <nathan@acm.org> Date: Mon Dec 21 05:36:32 2020 -0800 libcody: Add netinet.h We explicitly need to inlude netinet.h, (despite what happened on my test systems) libcody/ * netclient.cc: Add netinet.h. Note, though, that my patch also fixed libcody/netserver.cc, which still failed. Seeing that your commit essentially matches my proposed patch, I went ahead and committed the remaining part. With that libcody now builds (and I'll look into the follow-up patch you shared). Thanks, Gerald
On 12/21/20 11:19 AM, Gerald Pfeifer wrote: > We explicitly need to inlude netinet.h, (despite what happened on my test systems) > > libcody/ > * netclient.cc: Add netinet.h. > > Note, though, that my patch also fixed libcody/netserver.cc, which still > failed. Seeing that your commit essentially matches my proposed patch, I > went ahead and committed the remaining part. > > With that libcody now builds (and I'll look into the follow-up patch > you shared). thanks, I didn't realize you had a patch already. nathan
diff --git a/libcody/netclient.cc b/libcody/netclient.cc index 8cccface71c..c97ed4ca126 100644 --- a/libcody/netclient.cc +++ b/libcody/netclient.cc @@ -14,6 +14,7 @@ #include <unistd.h> #include <arpa/inet.h> #include <sys/un.h> +#include <netinet/in.h> #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0 diff --git a/libcody/netserver.cc b/libcody/netserver.cc index 7e43eb033f4..4e55089161e 100644 --- a/libcody/netserver.cc +++ b/libcody/netserver.cc @@ -13,6 +13,7 @@ #include <unistd.h> #include <arpa/inet.h> #include <sys/un.h> +#include <netinet/in.h> #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0