This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]