dragonflybsd: use sendfile(2) for uv_fs_sendfile
PR-URL: https://github.com/libuv/libuv/pull/399 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
94ba71b9eb
commit
db8c812a3d
@ -545,7 +545,7 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) {
|
||||
|
||||
return -1;
|
||||
}
|
||||
#elif defined(__FreeBSD__) || defined(__APPLE__)
|
||||
#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
|
||||
{
|
||||
off_t len;
|
||||
ssize_t r;
|
||||
@ -555,7 +555,7 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) {
|
||||
* number of bytes have been sent, we don't consider it an error.
|
||||
*/
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
len = 0;
|
||||
r = sendfile(in_fd, out_fd, req->off, req->bufsml[0].len, NULL, &len, 0);
|
||||
#else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user