logo

oasis

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

0001-Only-use-inline-asm-in-headers-on-GNU-compatible-com.patch (907B)


  1. From 0043f6d3073da1b4adc0cdfd9bf1768a58034353 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Mon, 17 Jun 2019 20:11:17 -0700
  4. Subject: [PATCH] Only use inline asm in headers on GNU-compatible compilers
  5. ---
  6. arch/x86/include/uapi/asm/swab.h | 4 ++++
  7. 1 file changed, 4 insertions(+)
  8. diff --git a/arch/x86/include/uapi/asm/swab.h b/arch/x86/include/uapi/asm/swab.h
  9. index cd3fd8ddbe9a..2074e5d7d94d 100644
  10. --- a/arch/x86/include/uapi/asm/swab.h
  11. +++ b/arch/x86/include/uapi/asm/swab.h
  12. @@ -5,6 +5,8 @@
  13. #include <linux/types.h>
  14. #include <linux/compiler.h>
  15. +#ifdef __GNUC__
  16. +
  17. static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
  18. {
  19. asm("bswapl %0" : "=r" (val) : "0" (val));
  20. @@ -34,4 +36,6 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 val)
  21. }
  22. #define __arch_swab64 __arch_swab64
  23. +#endif /* __GNUC__ */
  24. +
  25. #endif /* _ASM_X86_SWAB_H */
  26. --
  27. 2.25.0