]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Add missed OS constant values
authorDmitriy Anisimkov <anisimko@adacore.com>
Sun, 13 Jun 2021 02:42:54 +0000 (08:42 +0600)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 9 Jul 2021 12:35:31 +0000 (12:35 +0000)
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
gcc/ada/s-oscons-tmplt.c

index eb6e6d965931fad0bb58c21423cfe4e3c57b9a2d..a987594782b70cdba996f4dc757c8ed73c6c8b52 100644 (file)
 #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>
index f373c39b9c24420793f748d39486df2184d16ea2..54fa2f1be0bd8928c7efd0a3c9866179a3b7407f 100644 (file)
@@ -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