diff options
author | Jannik Glückert <jannik.glueckert@gmail.com> | 2025-01-07 15:29:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-07 09:29:35 -0500 |
commit | faa3f752896903c2d09d389970d3d0ebf50a1073 (patch) | |
tree | 555eedcee5e034e7facc9fea029fc9e41e7aad95 /libcxx/src/filesystem/operations.cpp | |
parent | ab5133bbc62af4686f305a3c7d85f74b9f5b949f (diff) | |
download | llvm-faa3f752896903c2d09d389970d3d0ebf50a1073.zip llvm-faa3f752896903c2d09d389970d3d0ebf50a1073.tar.gz llvm-faa3f752896903c2d09d389970d3d0ebf50a1073.tar.bz2 |
[libc++] Fix largefile handling in fs::copy_file (#121855)
Fix for issues reported in https://github.com/llvm/llvm-project/pull/109211
Diffstat (limited to 'libcxx/src/filesystem/operations.cpp')
-rw-r--r-- | libcxx/src/filesystem/operations.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp index bd37c5a..208a557 100644 --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -238,8 +238,14 @@ bool copy_file_impl_copy_file_range(FileDescriptor& read_fd, FileDescriptor& wri return false; } // do not modify the fd positions as copy_file_impl_sendfile may be called after a partial copy +# if defined(__linux__) + loff_t off_in = 0; + loff_t off_out = 0; +# else off_t off_in = 0; off_t off_out = 0; +# endif + do { ssize_t res; |