[libcxx-commits] [libcxx] [libcxx] Fix build for glibc < 2.27 (PR #121893)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 7 09:01:09 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 8d2e611802d5f3bdd681d308ceb293e5ace8a894 77205e5355d2d21696980b45d3436c6dd8871038 --extensions cpp -- libcxx/src/filesystem/operations.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp
index ef8d58e5c6..d954dc6c4c 100644
--- a/libcxx/src/filesystem/operations.cpp
+++ b/libcxx/src/filesystem/operations.cpp
@@ -40,7 +40,9 @@
#include <time.h>
// since Linux 4.5 and FreeBSD 13, but the Linux libc wrapper is only provided by glibc >= 2.27 and musl
-#if (defined(__linux__) && ((defined(_LIBCPP_GLIBC_PREREQ) && _LIBCPP_GLIBC_PREREQ(2, 27)) || _LIBCPP_HAS_MUSL_LIBC)) || defined(__FreeBSD__)
+#if (defined(__linux__) && \
+ ((defined(_LIBCPP_GLIBC_PREREQ) && _LIBCPP_GLIBC_PREREQ(2, 27)) || _LIBCPP_HAS_MUSL_LIBC)) || \
+ defined(__FreeBSD__)
# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE
#endif
#if __has_include(<sys/sendfile.h>)
``````````
</details>
https://github.com/llvm/llvm-project/pull/121893
More information about the libcxx-commits
mailing list