Browse Source

mesa,libxshmfence: Define __NR_futex for rv32

Helps these nosy apps build
Fixes #201

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj 4 years ago
parent
commit
8b73b069b0

+ 13 - 0
recipes-graphics/mesa/mesa/rv32-sys-futex.patch

@@ -0,0 +1,13 @@
+--- a/src/util/futex.h
++++ b/src/util/futex.h
+@@ -26,6 +26,10 @@
+ 
+ #if defined(HAVE_LINUX_FUTEX_H)
+ 
++#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_futex __NR_futex_time64
++#endif
++
+ #include <limits.h>
+ #include <stdint.h>
+ #include <unistd.h>

+ 3 - 0
recipes-graphics/mesa/mesa_19.%.bbappend

@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append_riscv32 = " file://rv32-sys-futex.patch"

+ 13 - 0
recipes-graphics/xorg-lib/libxshmfence/rv32_sys_futex.patch

@@ -0,0 +1,13 @@
+--- a/src/xshmfence_futex.h
++++ b/src/xshmfence_futex.h
+@@ -47,6 +47,10 @@ static inline int futex_wait(int32_t *ad
+ 
+ #else
+ 
++#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_futex __NR_futex_time64
++#endif
++
+ #include <stdint.h>
+ #include <values.h>
+ #include <linux/futex.h>

+ 4 - 0
recipes-graphics/xorg-lib/libxshmfence_1.3.bbappend

@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append_riscv32 = " file://rv32_sys_futex.patch"
+