Include netinet/in.h in include/experimental/internet
authorAndreas Tobler <andreast@gcc.gnu.org>
Mon, 30 Sep 2019 20:26:57 +0000 (22:26 +0200)
committerAndreas Tobler <andreast@gcc.gnu.org>
Mon, 30 Sep 2019 20:26:57 +0000 (22:26 +0200)
    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: r276374

libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/internet

index 6c50a1ce0fb5b804a8db37bcb885b99d37906e64..8ed4309116113ba71c7d3a781ad8860b33e681e3 100644 (file)
@@ -1,5 +1,8 @@
 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.
+
        * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
        FreeBSD warning about lower advertised precision of tgammal.
        * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
index 929a747a2502785023caacb58172aca735194854..eafabf64e0d55e362185692df3dec4e6e0310753 100644 (file)
@@ -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