This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Include netinet/in.h in include/experimental/internet
- From: Andreas Tobler <andreast-list at fgznet dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 30 Sep 2019 18:58:56 +0200
- Subject: [PATCH] Include netinet/in.h in include/experimental/internet
Hi all,
I'm going to commit the attached patch to trunk.
It is preapproved by Jonathan. (via #irc)
On FreeBSD the netinet/in.h header is not included by arpa/inet.h, so do
the include if we have the _GLIBCXX_HAVE_NETINET_IN_H defined.
This makes all the experimental/net/internet test cases pass here.
Any comments?
TIA,
Andreas
Commit one-liner:
Include netinet/in.h in include/experimental/internet
2019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
* include/experimental/internet: Include netinet/in.h if we have
_GLIBCXX_HAVE_NETINET_IN_H defined.
Index: include/experimental/internet
===================================================================
--- include/experimental/internet (revision 276342)
+++ include/experimental/internet (working copy)
@@ -51,6 +51,9 @@
#ifdef _GLIBCXX_HAVE_ARPA_INET_H
# include <arpa/inet.h> // inet_ntop
#endif
+#ifdef _GLIBCXX_HAVE_NETINET_IN_H
+# include <netinet/in.h> // IPPROTO_IP
+#endif
#ifdef _GLIBCXX_HAVE_NETINET_TCP_H
# include <netinet/tcp.h> // TCP_NODELAY
#endif