[Bug libstdc++/83279] std::experimental::filesystem::copy_file can't copy larger files than 2.0GiB

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Dec 17 22:19:00 GMT 2017


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.


More information about the Gcc-bugs mailing list