rv32-sys-futex.patch 710 B

12345678910111213141516171819202122232425
  1. From 45544e43f60418917dfd8ec57e99880ce38ced88 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Thu, 30 Jan 2020 16:57:50 -0800
  4. Subject: [PATCH] mesa,libxshmfence: Define __NR_futex for rv32
  5. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  6. ---
  7. src/util/futex.h | 4 ++++
  8. 1 file changed, 4 insertions(+)
  9. diff --git a/src/util/futex.h b/src/util/futex.h
  10. index 4d712e2..920818d 100644
  11. --- a/src/util/futex.h
  12. +++ b/src/util/futex.h
  13. @@ -27,6 +27,10 @@
  14. #if defined(HAVE_LINUX_FUTEX_H)
  15. #define UTIL_FUTEX_SUPPORTED 1
  16. +#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
  17. +# define __NR_futex __NR_futex_time64
  18. +#endif
  19. +
  20. #include <limits.h>
  21. #include <stdint.h>
  22. #include <unistd.h>