From db8c812a3dadc6e9ec51a8e9d35bc173b7c30b2c Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Mon, 15 Jun 2015 01:21:22 +0200 Subject: [PATCH] dragonflybsd: use sendfile(2) for uv_fs_sendfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/libuv/libuv/pull/399 Reviewed-By: Ben Noordhuis Reviewed-By: Saúl Ibarra Corretgé --- src/unix/fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index 9dab202d..eb8d1499 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -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