logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0012-Prevent-redefinition-of-SIOCGSTAMP-and-SIOCGSTAMPNS.patch (1121B)


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