[libcxx-commits] [libcxx] [libcxx] Fix build for glibc < 2.27 (PR #121893)
Yi Kong via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 7 08:57:54 PST 2025
================
@@ -39,8 +39,8 @@
#include <fcntl.h> /* values for fchmodat */
#include <time.h>
-// since Linux 4.5 and FreeBSD 13, but the Linux libc wrapper is only provided by glibc and musl
-#if (defined(__linux__) && (defined(__GLIBC__) || _LIBCPP_HAS_MUSL_LIBC)) || defined(__FreeBSD__)
+// since Linux 4.5 and FreeBSD 13, but the Linux libc wrapper is only provided by glibc >= 2.27 and musl
+#if (defined(__linux__) && (_LIBCPP_GLIBC_PREREQ(2, 27) || _LIBCPP_HAS_MUSL_LIBC)) || defined(__FreeBSD__)
----------------
kongy wrote:
Already fixed.
https://github.com/llvm/llvm-project/pull/121893
More information about the libcxx-commits
mailing list