Skip to content

Commit

Permalink
[libc++] Fix largefile handling in fs::copy_file (llvm#121855)
Browse files Browse the repository at this point in the history
Fix for issues reported in llvm#109211
  • Loading branch information
Jannik2099 authored Jan 7, 2025
1 parent ab5133b commit faa3f75
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libcxx/src/filesystem/operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit faa3f75

Please sign in to comment.