PR libstdc++/70975
* src/filesystem/ops.cc (do_copy_file) [_GLIBCXX_USE_SENDFILE]:
Pass non-null pointer to sendfile for offset argument.
From-SVN: r241629
+2016-10-27 Uros Bizjak <ubizjak@gmail.com>
+
+ PR libstdc++/70975
+ * src/filesystem/ops.cc (do_copy_file) [_GLIBCXX_USE_SENDFILE]:
+ Pass non-null pointer to sendfile for offset argument.
+
2016-10-27 Jonathan Wakely <jwakely@redhat.com>
* testsuite/ext/random/uniform_inside_sphere_distribution/cons/
}
#ifdef _GLIBCXX_USE_SENDFILE
- const auto n = ::sendfile(out.fd, in.fd, nullptr, from_st->st_size);
+ off_t offset = 0;
+ const auto n = ::sendfile(out.fd, in.fd, &offset, from_st->st_size);
if (n < 0 && (errno == ENOSYS || errno == EINVAL))
{
#endif