1From d266a4f1050e083596723e25ce4ffb0be09ab162 Mon Sep 17 00:00:00 2001
2From: Michael Forney <mforney@mforney.org>
3Date: Thu, 4 Jun 2020 22:23:11 -0700
4Subject: [PATCH] Prevent redefinition of SIOCGSTAMP and SIOCGSTAMPNS
5
6---
7 include/uapi/linux/sockios.h | 8 ++++++++
8 1 file changed, 8 insertions(+)
9
10diff --git a/include/uapi/linux/sockios.h b/include/uapi/linux/sockios.h
11index 7d1bccbb..ef870187 100644
12--- a/include/uapi/linux/sockios.h
13+++ b/include/uapi/linux/sockios.h
14@@ -39,14 +39,22 @@
15
16 #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
17 /* on 64-bit and x32, avoid the ?: operator */
18+#ifndef SIOCGSTAMP
19 #define SIOCGSTAMP SIOCGSTAMP_OLD
20+#endif
21+#ifndef SIOCGSTAMPNS
22 #define SIOCGSTAMPNS SIOCGSTAMPNS_OLD
23+#endif
24 #else
25+#ifndef SIOCGSTAMP
26 #define SIOCGSTAMP ((sizeof(struct timeval)) == 8 ? \
27 SIOCGSTAMP_OLD : SIOCGSTAMP_NEW)
28+#endif
29+#ifndef SIOCGSTAMPNS
30 #define SIOCGSTAMPNS ((sizeof(struct timespec)) == 8 ? \
31 SIOCGSTAMPNS_OLD : SIOCGSTAMPNS_NEW)
32 #endif
33+#endif
34
35 /* Routing table calls. */
36 #define SIOCADDRT 0x890B /* add routing table entry */
37--
382.27.0
39