mirror of
https://github.com/thead-yocto-mirror/meta-riscv
synced 2026-06-21 08:52:24 +02:00
mesa,libxshmfence: Define __NR_futex for rv32
Helps these nosy apps build Fixes #201 Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
13
recipes-graphics/mesa/mesa/rv32-sys-futex.patch
Normal file
13
recipes-graphics/mesa/mesa/rv32-sys-futex.patch
Normal file
@@ -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
recipes-graphics/mesa/mesa_19.%.bbappend
Normal file
3
recipes-graphics/mesa/mesa_19.%.bbappend
Normal file
@@ -0,0 +1,3 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI_append_riscv32 = " file://rv32-sys-futex.patch"
|
||||
13
recipes-graphics/xorg-lib/libxshmfence/rv32_sys_futex.patch
Normal file
13
recipes-graphics/xorg-lib/libxshmfence/rv32_sys_futex.patch
Normal file
@@ -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
recipes-graphics/xorg-lib/libxshmfence_1.3.bbappend
Normal file
4
recipes-graphics/xorg-lib/libxshmfence_1.3.bbappend
Normal file
@@ -0,0 +1,4 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI_append_riscv32 = " file://rv32_sys_futex.patch"
|
||||
|
||||
Reference in New Issue
Block a user