diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-11-15 12:33:40 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-11-15 12:35:26 -0800 |
commit | 57e7a27620a5cbe1809f5b19121d8e9795f8e1e4 (patch) | |
tree | 4f24037e916f61373e183bcef1e2f5ad9a915ca9 /meta-oe/recipes-graphics | |
parent | 44bd7e632e57c53f0e2fed212bc44b636daba61c (diff) | |
download | meta-openembedded-contrib-57e7a27620a5cbe1809f5b19121d8e9795f8e1e4.tar.gz |
directfb: Fix build on riscv32
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics')
-rw-r--r-- | meta-oe/recipes-graphics/directfb/directfb.inc | 1 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/directfb/directfb/0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch | 54 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/directfb/directfb.inc b/meta-oe/recipes-graphics/directfb/directfb.inc index f7dc668433..e11f7a60f6 100644 --- a/meta-oe/recipes-graphics/directfb/directfb.inc +++ b/meta-oe/recipes-graphics/directfb/directfb.inc @@ -22,6 +22,7 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.g file://fix-client-gfx_state-initialisation.patch \ file://fix-tslib-version-check.patch \ file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ + file://0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch \ " S = "${WORKDIR}/DirectFB-${PV}" diff --git a/meta-oe/recipes-graphics/directfb/directfb/0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch b/meta-oe/recipes-graphics/directfb/directfb/0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch new file mode 100644 index 0000000000..db4417a3d6 --- /dev/null +++ b/meta-oe/recipes-graphics/directfb/directfb/0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch @@ -0,0 +1,54 @@ +From 7df69c3a784ab2cc4770bdb366cf788cdb78099a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Nov 2020 12:30:41 -0800 +Subject: [PATCH] os/linux: Fix build when __NR_futex is not available + +Newer architectures like riscv32 do not define __NR_futex intentionally +since it uses 64bit time_t from very beginning, therefore only caters to +futex_time64 syscall + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/direct/os/linux/glibc/system.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/lib/direct/os/linux/glibc/system.c b/lib/direct/os/linux/glibc/system.c +index 373a711..d027a70 100644 +--- a/lib/direct/os/linux/glibc/system.c ++++ b/lib/direct/os/linux/glibc/system.c +@@ -36,6 +36,7 @@ + + #include <errno.h> + #include <signal.h> ++#include <sys/syscall.h> + #include <unistd.h> + + #include <linux/unistd.h> +@@ -46,6 +47,10 @@ + #include <direct/system.h> + #include <direct/util.h> + ++#if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++#endif ++ + D_LOG_DOMAIN( Direct_Futex, "Direct/Futex", "Direct Futex" ); + D_LOG_DOMAIN( Direct_Trap, "Direct/Trap", "Direct Trap" ); + +@@ -239,10 +244,9 @@ direct_futex( int *uaddr, int op, int val, const struct timespec *timeout, int * + } + #endif + +- ret = syscall( __NR_futex, uaddr, op, val, timeout, uaddr2, val3 ); ++ ret = syscall( SYS_futex, uaddr, op, val, timeout, uaddr2, val3 ); + if (ret < 0) + return errno2result( errno ); + + return DR_OK; + } +- +-- +2.29.2 + |