[gcc/devel/omp/gcc-9] Include netinet/in.h in include/experimental/internet

Tobias Burnus burnus@gcc.gnu.org
Thu Mar 5 14:14:00 GMT 2020


https://gcc.gnu.org/g:a8b705aa4344f839ef3628ecf045818c2c28763c

commit a8b705aa4344f839ef3628ecf045818c2c28763c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Oct 24 13:54:09 2019 +0100

    Include netinet/in.h in include/experimental/internet
    
    Backport from mainline
    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.
    
    From-SVN: r277379

Diff:
---
 libstdc++-v3/ChangeLog                     | 6 ++++++
 libstdc++-v3/include/experimental/internet | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 92f91d6..a349b55 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,6 +1,12 @@
 2019-10-24  Jonathan Wakely  <jwakely@redhat.com>
 
 	Backport from mainline
+	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.
+
+	Backport from mainline
 	2019-09-26  Jonathan Wakely  <jwakely@redhat.com>
 
 	* include/experimental/internet (operator==, operator<): Fix loop
diff --git a/libstdc++-v3/include/experimental/internet b/libstdc++-v3/include/experimental/internet
index e1368ec..3b39773 100644
--- a/libstdc++-v3/include/experimental/internet
+++ b/libstdc++-v3/include/experimental/internet
@@ -50,6 +50,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



More information about the Libstdc++-cvs mailing list