From bb66a1021527ab68975a02cc3359c71c69ce443b Mon Sep 17 00:00:00 2001 From: Dmitriy Anisimkov Date: Sun, 13 Jun 2021 08:42:54 +0600 Subject: [PATCH] [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. --- gcc/ada/gsocket.h | 1 + gcc/ada/s-oscons-tmplt.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h index eb6e6d965931..a987594782b7 100644 --- a/gcc/ada/gsocket.h +++ b/gcc/ada/gsocket.h @@ -215,6 +215,7 @@ #if !(defined (VMS) || defined (__MINGW32__)) #include #include +#include #include #include #include diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index f373c39b9c24..54fa2f1be0bd 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 -- 2.43.5