Skip to content

Commit 19113a4

Browse files
author
Raman Shyshniou
committed
[libc++][FreeBSD] use copy_file_range() in FreeBSD >= 13.0
1 parent b00c620 commit 19113a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libcxx/src/filesystem/operations.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE
5151
# endif
5252
#elif defined(__FreeBSD__)
53-
# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE
53+
# include <sys/param.h>
54+
# if __FreeBSD_version >= 1300000
55+
# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE
56+
# endif
5457
#endif
5558
#if __has_include(<sys/sendfile.h>)
5659
# include <sys/sendfile.h>

0 commit comments

Comments
 (0)