Skip to content
Snippets Groups Projects
Unverified Commit 419a9768 authored by Yuki Okushi's avatar Yuki Okushi Committed by GitHub
Browse files

Rollup merge of #1944 - nroi:include-sendfile64, r=JohnTitor

Include sendfile64() for Linux

`sendfile` uses the `off_t` type, which is platform dependent. On 64-bit architectures, I can pass an `off64_t` as the third argument to `libc::sendfile`, but on 32-bit architectures, this does not compile. `sendfile64` on the other hand uses a 64-bit wide offset even on 32-bit architectures, so that `off64_t` can be used.

Excerpt from `man 2 sendfile`:

> The original Linux sendfile() system call was not designed to handle large file offsets. Consequently, Linux 2.4 added sendfile64(), with a wider type for the offset argument.

I hope that supporting Linux versions below 2.4 is not a requirement for libc.
parents fd266e0c a8c1d974
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment