This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/83279] std::experimental::filesystem::copy_file can't copy larger files than 2.0GiB
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Dec 2017 22:19:19 +0000
- Subject: [Bug libstdc++/83279] std::experimental::filesystem::copy_file can't copy larger files than 2.0GiB
- Auto-submitted: auto-generated
- References: <bug-83279-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83279
--- Comment #18 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jonathan Wakely from comment #10)
> Author: redi
> Date: Thu Dec 14 21:49:03 2017
> New Revision: 255666
#ifdef _GLIBCXX_USE_SENDFILE
- off_t offset = 0;
- const auto n = ::sendfile(out.fd, in.fd, &offset, from_st->st_size);
- if (n < 0 && (errno == ENOSYS || errno == EINVAL))
+ n = ::sendfile(out.fd, in.fd, nullptr, count);
This change will trigger PR 70975. Older (?) Solaris 12 targets require
non-null pointer for the offset argument.