[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
Thu Feb 4 08:39:34 PST 2021


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG85b9c5ccc172: [libc++] Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. (authored by ldionne).

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.321454.patch
Type: text/x-patch
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210204/b8b96f67/attachment-0001.bin>


More information about the libcxx-commits mailing list