aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorDmitriy Anisimkov <anisimko@adacore.com>2021-06-13 08:42:54 +0600
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-09 12:35:31 +0000
commitbb66a1021527ab68975a02cc3359c71c69ce443b (patch)
treeff025fd9f29f3dedcc6387ca2e5bb55e16d72fa5 /gcc/ada
parentd206399a97bc0111cff30c66c535ce0884228b77 (diff)
downloadgcc-bb66a1021527ab68975a02cc3359c71c69ce443b.zip
gcc-bb66a1021527ab68975a02cc3359c71c69ce443b.tar.gz
gcc-bb66a1021527ab68975a02cc3359c71c69ce443b.tar.bz2
[Ada] Add missed OS constant values
gcc/ada/ * gsocket.h: Include net/if.h to get IF_NAMESIZE constant. * s-oscons-tmplt.c: Define IPV6_FLOWINFO for Linux.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/gsocket.h1
-rw-r--r--gcc/ada/s-oscons-tmplt.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h
index eb6e6d9..a987594 100644
--- a/gcc/ada/gsocket.h
+++ b/gcc/ada/gsocket.h
@@ -215,6 +215,7 @@
#if !(defined (VMS) || defined (__MINGW32__))
#include <sys/socket.h>
#include <sys/un.h>
+#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/ioctl.h>
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index f373c39..54fa2f1 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -1689,8 +1689,14 @@ CND(IPV6_DSTOPTS, "Set the destination options delivery")
CND(IPV6_HOPOPTS, "Set the hop options delivery")
#ifndef IPV6_FLOWINFO
+#ifdef __linux__
+/* The IPV6_FLOWINFO is defined in linux/in6.h, but we can't include it because
+ * of conflicts with other headers. */
+# define IPV6_FLOWINFO 11
+#else
# define IPV6_FLOWINFO -1
#endif
+#endif
CND(IPV6_FLOWINFO, "Set the flow ID delivery")
#ifndef IPV6_HOPLIMIT