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.