diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp index b71f94a89d6df..e58486bf5cbbd 100644 --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -50,7 +50,10 @@ # define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE # endif #elif defined(__FreeBSD__) -# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE +# include +# if __FreeBSD_version >= 1300000 +# define _LIBCPP_FILESYSTEM_USE_COPY_FILE_RANGE +# endif #endif #if __has_include() # include