9832fd
[RHBZ #1579451]
9832fd
This is a backport of the following two upstream patches:
9832fd
9832fd
commit 31545c23277cd54a1edd41c85d8255fb589158e3
9832fd
Author: Joseph Myers <joseph@codesourcery.com>
9832fd
Date:   Mon Jun 29 14:38:46 2015 +0000
9832fd
9832fd
    Update headers for Linux 4.0, 4.1 definitions.
9832fd
9832fd
    This patch updates installed glibc headers for new definitions from
9832fd
    Linux 4.0 and 4.1 that seem relevant to glibc headers.  In addition, I
9832fd
    noticed that PF_IB / AF_IB, added in Linux 3.11, were missing for no
9832fd
    obvious reason, so added those as well.
9832fd
9832fd
    Tested for x86_64 (testsuite, and that installed stripped shared
9832fd
    libraries are unchanged by the patch).
9832fd
9832fd
        * sysdeps/unix/sysv/linux/bits/in.h (IP_CHECKSUM): New macro.
9832fd
        * sysdeps/unix/sysv/linux/bits/socket.h (PF_IB): Likewise.
9832fd
        (PF_MPLS): Likewise.
9832fd
        (AF_IB): Likewise.
9832fd
        (AF_MPLS): Likewise.
9832fd
        * sysdeps/unix/sysv/linux/sys/mount.h (MS_LAZYTIME): New enum
9832fd
        value and macro.
9832fd
        (MS_RMT_MASK): Include MS_LAZYTIME.
9832fd
9832fd
commit 04d9a38bafddb92ab79bc0015533689e15848522
9832fd
Author: Joseph Myers <joseph@codesourcery.com>
9832fd
Date:   Tue Sep 1 13:47:25 2015 +0000
9832fd
9832fd
    Add netinet/in.h values from Linux 4.2.
9832fd
9832fd
    This patch adds new constants from Linux 4.2 to netinet/in.h:
9832fd
    IPPROTO_MPLS and IP_BIND_ADDRESS_NO_PORT (both in
9832fd
    include/uapi/linux/in.h in Linux; one directly in netinet/in.h, one in
9832fd
    bits/in.h in glibc).
9832fd
9832fd
    Tested for x86_64 (testsuite, and that installed stripped shared
9832fd
    libraries are unchanged by the patch).
9832fd
9832fd
        * inet/netinet/in.h (IPPROTO_MPLS): New enum value and macro.
9832fd
        * sysdeps/unix/sysv/linux/bits/in.h (IP_BIND_ADDRESS_NO_PORT): New
9832fd
        macro.
9832fd
9832fd
9832fd
diff -Nrup a/inet/netinet/in.h b/inet/netinet/in.h
9832fd
--- a/inet/netinet/in.h	2019-07-30 12:03:33.082066705 -0400
9832fd
+++ b/inet/netinet/in.h	2019-07-30 12:22:54.461572719 -0400
9832fd
@@ -86,6 +86,8 @@ enum
9832fd
 #define IPPROTO_SCTP		IPPROTO_SCTP
9832fd
     IPPROTO_UDPLITE = 136, /* UDP-Lite protocol.  */
9832fd
 #define IPPROTO_UDPLITE		IPPROTO_UDPLITE
9832fd
+    IPPROTO_MPLS = 137,    /* MPLS in IP.  */
9832fd
+#define IPPROTO_MPLS           IPPROTO_MPLS
9832fd
     IPPROTO_RAW = 255,	   /* Raw IP packets.  */
9832fd
 #define IPPROTO_RAW		IPPROTO_RAW
9832fd
     IPPROTO_MAX
9832fd
diff -Nrup a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
9832fd
--- a/sysdeps/unix/sysv/linux/bits/in.h	2019-07-30 12:03:35.863052019 -0400
9832fd
+++ b/sysdeps/unix/sysv/linux/bits/in.h	2019-07-30 12:51:15.293703728 -0400
9832fd
@@ -99,6 +99,8 @@
9832fd
 
9832fd
 #define IP_MINTTL       21
9832fd
 #define IP_NODEFRAG     22
9832fd
+#define IP_CHECKSUM     23
9832fd
+#define IP_BIND_ADDRESS_NO_PORT 24
9832fd
 
9832fd
 /* IP_MTU_DISCOVER arguments.  */
9832fd
 #define IP_PMTUDISC_DONT   0	/* Never send DF frames.  */
9832fd
diff -Nrup a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
9832fd
--- a/sysdeps/unix/sysv/linux/bits/socket.h	2019-07-30 12:03:33.757063141 -0400
9832fd
+++ b/sysdeps/unix/sysv/linux/bits/socket.h	2019-07-30 12:54:02.612870856 -0400
9832fd
@@ -69,6 +69,8 @@ typedef __socklen_t socklen_t;
9832fd
 #define	PF_PPPOX	24	/* PPPoX sockets.  */
9832fd
 #define	PF_WANPIPE	25	/* Wanpipe API sockets.  */
9832fd
 #define PF_LLC		26	/* Linux LLC.  */
9832fd
+#define PF_IB		27      /* Native InfiniBand address.  */
9832fd
+#define PF_MPLS		28      /* MPLS.  */
9832fd
 #define PF_CAN		29	/* Controller Area Network.  */
9832fd
 #define PF_TIPC		30	/* TIPC sockets.  */
9832fd
 #define	PF_BLUETOOTH	31	/* Bluetooth sockets.  */
9832fd
@@ -114,6 +116,8 @@ typedef __socklen_t socklen_t;
9832fd
 #define	AF_PPPOX	PF_PPPOX
9832fd
 #define	AF_WANPIPE	PF_WANPIPE
9832fd
 #define AF_LLC		PF_LLC
9832fd
+#define AF_IB		PF_IB
9832fd
+#define AF_MPLS		PF_MPLS
9832fd
 #define AF_CAN		PF_CAN
9832fd
 #define AF_TIPC		PF_TIPC
9832fd
 #define	AF_BLUETOOTH	PF_BLUETOOTH
9832fd
diff -Nrup a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
9832fd
--- a/sysdeps/unix/sysv/linux/sys/mount.h	2012-12-24 22:02:13.000000000 -0500
9832fd
+++ b/sysdeps/unix/sysv/linux/sys/mount.h	2019-07-30 12:58:23.595571750 -0400
9832fd
@@ -78,6 +78,8 @@ enum
9832fd
 #define MS_I_VERSION	MS_I_VERSION
9832fd
   MS_STRICTATIME = 1 << 24,	/* Always perform atime updates.  */
9832fd
 #define MS_STRICTATIME	MS_STRICTATIME
9832fd
+  MS_LAZYTIME = 1 << 25,       /* Update the on-disk [acm]times lazily.  */
9832fd
+#define MS_LAZYTIME    MS_LAZYTIME
9832fd
   MS_ACTIVE = 1 << 30,
9832fd
 #define MS_ACTIVE	MS_ACTIVE
9832fd
   MS_NOUSER = 1 << 31
9832fd
@@ -85,7 +87,8 @@ enum
9832fd
 };
9832fd
 
9832fd
 /* Flags that can be altered by MS_REMOUNT  */
9832fd
-#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
9832fd
+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION \
9832fd
+		    |MS_LAZYTIME)
9832fd
 
9832fd
 
9832fd
 /* Magic mount flag number. Has to be or-ed to the flag values.  */