diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-03-25 13:51:57 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-03-25 13:51:57 +0100 |
commit | 11ed42771dec06626457eae58f2f334df1397f72 (patch) | |
tree | 872643b361cdff0afddf20e142cc2301cddb27b9 /libguile/filesys.c | |
parent | f28885f4957882c4d96bdfee11d26cd265539aac (diff) | |
download | guile-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/filesys.c')
-rw-r--r-- | libguile/filesys.c | 4 |
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); |