diff options
| -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 | |||
| 22 | file://fix-client-gfx_state-initialisation.patch \ | 22 | file://fix-client-gfx_state-initialisation.patch \ |
| 23 | file://fix-tslib-version-check.patch \ | 23 | file://fix-tslib-version-check.patch \ |
| 24 | file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ | 24 | file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ |
| 25 | file://0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch \ | ||
| 25 | " | 26 | " |
| 26 | 27 | ||
| 27 | S = "${WORKDIR}/DirectFB-${PV}" | 28 | 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 @@ | |||
| 1 | From 7df69c3a784ab2cc4770bdb366cf788cdb78099a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 15 Nov 2020 12:30:41 -0800 | ||
| 4 | Subject: [PATCH] os/linux: Fix build when __NR_futex is not available | ||
| 5 | |||
| 6 | Newer architectures like riscv32 do not define __NR_futex intentionally | ||
| 7 | since it uses 64bit time_t from very beginning, therefore only caters to | ||
| 8 | futex_time64 syscall | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | lib/direct/os/linux/glibc/system.c | 8 ++++++-- | ||
| 15 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/lib/direct/os/linux/glibc/system.c b/lib/direct/os/linux/glibc/system.c | ||
| 18 | index 373a711..d027a70 100644 | ||
| 19 | --- a/lib/direct/os/linux/glibc/system.c | ||
| 20 | +++ b/lib/direct/os/linux/glibc/system.c | ||
| 21 | @@ -36,6 +36,7 @@ | ||
| 22 | |||
| 23 | #include <errno.h> | ||
| 24 | #include <signal.h> | ||
| 25 | +#include <sys/syscall.h> | ||
| 26 | #include <unistd.h> | ||
| 27 | |||
| 28 | #include <linux/unistd.h> | ||
| 29 | @@ -46,6 +47,10 @@ | ||
| 30 | #include <direct/system.h> | ||
| 31 | #include <direct/util.h> | ||
| 32 | |||
| 33 | +#if !defined(SYS_futex) && defined(SYS_futex_time64) | ||
| 34 | +# define SYS_futex SYS_futex_time64 | ||
| 35 | +#endif | ||
| 36 | + | ||
| 37 | D_LOG_DOMAIN( Direct_Futex, "Direct/Futex", "Direct Futex" ); | ||
| 38 | D_LOG_DOMAIN( Direct_Trap, "Direct/Trap", "Direct Trap" ); | ||
| 39 | |||
| 40 | @@ -239,10 +244,9 @@ direct_futex( int *uaddr, int op, int val, const struct timespec *timeout, int * | ||
| 41 | } | ||
| 42 | #endif | ||
| 43 | |||
| 44 | - ret = syscall( __NR_futex, uaddr, op, val, timeout, uaddr2, val3 ); | ||
| 45 | + ret = syscall( SYS_futex, uaddr, op, val, timeout, uaddr2, val3 ); | ||
| 46 | if (ret < 0) | ||
| 47 | return errno2result( errno ); | ||
| 48 | |||
| 49 | return DR_OK; | ||
| 50 | } | ||
| 51 | - | ||
| 52 | -- | ||
| 53 | 2.29.2 | ||
| 54 | |||
