Index: libcxx/src/atomic.cpp =================================================================== --- libcxx/src/atomic.cpp +++ libcxx/src/atomic.cpp @@ -19,6 +19,16 @@ #include #include +// libc++ uses SYS_futex, which it expects from system C library. +// in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex) +// rv32 is using 64bit time_t from get go unlike other 32bit architectures +// in glibc, therefore it wont have NR_futex defined but just NR_futex_time64 +// this aliases it to NR_futex so that SYS_futex is then defined for rv32 + +#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