From 251f3295b498b699aa2b926167a788a6b6dbc033 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 3 Feb 2021 17:00:20 -0500 Subject: [PATCH] =?utf8?q?[=F0=9F=8D=92][libc++]=20Fix=20libcxx=20build=20?= =?utf8?q?on=2032bit=20architectures=20with=2064bit=20time=5Ft=20defaults?= =?utf8?q?=20e.g.=20riscv32?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Khem Raj. (cherry pick of commit 85b9c5ccc172a1e61c7ecaaec4752587cb6f1e26) Differential Revision: https://reviews.llvm.org/D96062 --- libcxx/src/atomic.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index 6b73ed771cd..9ae1fb5199b 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -19,6 +19,12 @@ #include #include +// libc++ uses SYS_futex as a universal syscall name. However, on 32 bit architectures +// with a 64 bit time_t, we need to specify SYS_futex_time64. +#if !defined(SYS_futex) && defined(SYS_futex_time64) +# define SYS_futex SYS_futex_time64 +#endif + #else // <- Add other operating systems here // Baseline needs no new headers -- 2.11.0