mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2025-03-01 08:17:14 +00:00
Fix size_t/off_t mixup in std::filesystem.
Summary: ftruncate takes an off_t, not a size_t. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D56578 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@351226 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae62476eac
commit
3ea6c6b30c
@ -439,7 +439,8 @@ file_status posix_lstat(path const& p, error_code* ec) {
|
||||
return posix_lstat(p, path_stat, ec);
|
||||
}
|
||||
|
||||
bool posix_ftruncate(const FileDescriptor& fd, size_t to_size, error_code& ec) {
|
||||
// http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html
|
||||
bool posix_ftruncate(const FileDescriptor& fd, off_t to_size, error_code& ec) {
|
||||
if (::ftruncate(fd.fd, to_size) == -1) {
|
||||
ec = capture_errno();
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user