PR70975 Pass valid offset argument to sendfile
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
This commit is contained in:
parent
4ce7157987
commit
47ffb5d95e
|
@ -1,3 +1,9 @@
|
|||
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/
|
||||
|
|
|
@ -444,7 +444,8 @@ namespace
|
|||
}
|
||||
|
||||
#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
|
||||
|
|
Loading…
Reference in New Issue