diff options
| -rw-r--r-- | recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch b/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch index 0d57cc7..9097047 100644 --- a/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch +++ b/recipes-devtools/clang/clang/0025-libcxx-Define-__NR_futex-to-be-__NR_futex_time64-on-.patch | |||
| @@ -14,13 +14,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 14 | libcxx/src/atomic.cpp | 10 ++++++++++ | 14 | libcxx/src/atomic.cpp | 10 ++++++++++ |
| 15 | 1 file changed, 10 insertions(+) | 15 | 1 file changed, 10 insertions(+) |
| 16 | 16 | ||
| 17 | diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp | ||
| 18 | index 6b73ed771cd..d2511529dce 100644 | ||
| 19 | --- a/libcxx/src/atomic.cpp | 17 | --- a/libcxx/src/atomic.cpp |
| 20 | +++ b/libcxx/src/atomic.cpp | 18 | +++ b/libcxx/src/atomic.cpp |
| 21 | @@ -15,6 +15,16 @@ | 19 | @@ -21,6 +21,16 @@ |
| 22 | 20 | #include <linux/futex.h> | |
| 23 | #ifdef __linux__ | 21 | #include <sys/syscall.h> |
| 24 | 22 | ||
| 25 | +// libc++ uses SYS_futex, which it expects from system C library. | 23 | +// libc++ uses SYS_futex, which it expects from system C library. |
| 26 | +// in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex) | 24 | +// in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex) |
| @@ -29,12 +27,9 @@ index 6b73ed771cd..d2511529dce 100644 | |||
| 29 | +// this aliases it to NR_futex so that SYS_futex is then defined for rv32 | 27 | +// this aliases it to NR_futex so that SYS_futex is then defined for rv32 |
| 30 | + | 28 | + |
| 31 | +#if !defined(SYS_futex) && defined(SYS_futex_time64) | 29 | +#if !defined(SYS_futex) && defined(SYS_futex_time64) |
| 32 | +# define SYS_futex SYS_futex_time64 | 30 | +#define SYS_futex SYS_futex_time64 |
| 33 | +#endif | 31 | +#endif |
| 34 | + | 32 | + |
| 35 | #include <unistd.h> | 33 | #else // <- Add other operating systems here |
| 36 | #include <linux/futex.h> | 34 | |
| 37 | #include <sys/syscall.h> | 35 | // Baseline needs no new headers |
| 38 | -- | ||
| 39 | 2.29.2 | ||
| 40 | |||
