summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-03-25 13:51:57 +0100
committerLudovic Courtès <ludo@gnu.org>2013-03-25 13:51:57 +0100
commit11ed42771dec06626457eae58f2f334df1397f72 (patch)
tree872643b361cdff0afddf20e142cc2301cddb27b9 /libguile
parentf28885f4957882c4d96bdfee11d26cd265539aac (diff)
downloadguile-11ed42771dec06626457eae58f2f334df1397f72.tar.gz
sendfile: Make sure we have a Linux-style `sendfile'.
* libguile/filesys.c (scm_sendfile): Change conditional to HAVE_SYS_SENDFILE_H && HAVE_SENDFILE.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/filesys.c4
1 files changed, 3 insertions, 1 deletions
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);