[libcxx-commits] [PATCH] D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 3 14:07:01 PST 2021


ldionne updated this revision to Diff 321223.
ldionne added a comment.

Rebase onto main and trigger CI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85095/new/

https://reviews.llvm.org/D85095

Files:
  libcxx/src/atomic.cpp


Index: libcxx/src/atomic.cpp
===================================================================
--- libcxx/src/atomic.cpp
+++ libcxx/src/atomic.cpp
@@ -19,6 +19,12 @@
 #include <linux/futex.h>
 #include <sys/syscall.h>
 
+// 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85095.321223.patch
Type: text/x-patch
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210203/fceb9228/attachment.bin>


More information about the libcxx-commits mailing list