public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2216] [Ada] Add missed OS constant values
@ 2021-07-09 12:39 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-09 12:39 UTC (permalink / raw)
  To: gcc-cvs

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

commit r12-2216-gbb66a1021527ab68975a02cc3359c71c69ce443b
Author: Dmitriy Anisimkov <anisimko@adacore.com>
Date:   Sun Jun 13 08:42:54 2021 +0600

    [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.

Diff:
---
 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 eb6e6d96593..a987594782b 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 f373c39b9c2..54fa2f1be0b 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-09 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 12:39 [gcc r12-2216] [Ada] Add missed OS constant values Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).