summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch')
-rw-r--r--recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch b/recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch
new file mode 100644
index 00000000..2accb08e
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch
@@ -0,0 +1,36 @@
1From bf314645e665d82c65771fb0d5f58558bbe1ba87 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 26 Oct 2020 22:10:02 -0700
4Subject: [PATCH] Define __NR_futex if it does not exist
5
6__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
7they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on
8__NR_futex, since this is used in applications, such applications start
9to fail to build for these newer architectures. This patch defines a
10fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
11working
12
13Upstream-Status: Pending
14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 src/corelib/thread/qfutex_p.h | 3 +++
18 1 file changed, 3 insertions(+)
19
20diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
21index f287b752d7..fa5307a604 100644
22--- a/src/corelib/thread/qfutex_p.h
23+++ b/src/corelib/thread/qfutex_p.h
24@@ -76,6 +76,9 @@ QT_END_NAMESPACE
25 # include <unistd.h>
26 # include <asm/unistd.h>
27 # include <linux/futex.h>
28+# if !defined(__NR_futex) && defined(__NR_futex_time64)
29+# define __NR_futex __NR_futex_time64
30+# endif
31 # define QT_ALWAYS_USE_FUTEX
32
33 // if not defined in linux/futex.h
34--
352.29.1
36