forked from riscv/meta-riscv
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mesa,libxshmfence: Define __NR_futex for rv32
Helps these nosy apps build Fixes riscv#201 Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
|
||
SRC_URI_append_riscv32 = " file://rv32-sys-futex.patch" |
13 changes: 13 additions & 0 deletions
13
recipes-graphics/xorg-lib/libxshmfence/rv32_sys_futex.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
|
||
SRC_URI_append_riscv32 = " file://rv32_sys_futex.patch" | ||
|