From 11ed42771dec06626457eae58f2f334df1397f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 25 Mar 2013 13:51:57 +0100 Subject: [PATCH] sendfile: Make sure we have a Linux-style `sendfile'. * libguile/filesys.c (scm_sendfile): Change conditional to HAVE_SYS_SENDFILE_H && HAVE_SENDFILE. --- libguile/filesys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libguile/filesys.c b/libguile/filesys.c index 334e2cd07..d318ae793 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1136,7 +1136,9 @@ SCM_DEFINE (scm_sendfile, "sendfile", 3, 1, 0, c_count = scm_to_size_t (count); c_offset = SCM_UNBNDP (offset) ? 0 : scm_to_off_t (offset); -#ifdef HAVE_SENDFILE +#if defined HAVE_SYS_SENDFILE_H && defined HAVE_SENDFILE + /* The Linux-style sendfile(2), which is different from the BSD-style. */ + result = sendfile_or_sendfile64 (out_fd, in_fd, SCM_UNBNDP (offset) ? NULL : &c_offset, c_count);