Skip to content

Commit 5461f89

Browse files
committed
Fix syntax
1 parent 628bcb0 commit 5461f89

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

libcxx/src/filesystem/operations.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@
4040
#include <time.h>
4141

4242
// since Linux 4.5 and FreeBSD 13, but the Linux libc wrapper is only provided by glibc >= 2.27 and musl
43-
#if (defined(__linux__) && \
44-
((defined(_LIBCPP_GLIBC_PREREQ) && _LIBCPP_GLIBC_PREREQ(2, 27)) || _LIBCPP_HAS_MUSL_LIBC)) || \
45-
defined(__FreeBSD__)
43+
#if defined(__linux__)
44+
# if defined(_LIBCPP_GLIBC_PREREQ)
45+
# if _LIBCPP_GLIBC_PREREQ(2, 27)
46+
# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE
47+
# endif
48+
# elif _LIBCPP_HAS_MUSL_LIBC
49+
# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE
50+
# endif
51+
#elif defined(__FreeBSD__)
4652
# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE
4753
#endif
4854
#if __has_include(<sys/sendfile.h>)

0 commit comments

Comments
 (0)