https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70975
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> --- Does following patch work: --cut here-- diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index 9abcee0..b709858 100644 --- a/libstdc++-v3/src/filesystem/ops.cc +++ b/libstdc++-v3/src/filesystem/ops.cc @@ -444,7 +444,9 @@ namespace } #ifdef _GLIBCXX_USE_SENDFILE - const auto n = ::sendfile(out.fd, in.fd, nullptr, from_st->st_size); + off_t always_zero_offset = 0; + const auto n = ::sendfile(out.fd, in.fd, + &always_zero_offset, from_st->st_size); if (n < 0 && (errno == ENOSYS || errno == EINVAL)) { #endif --cut here--