summaryrefslogtreecommitdiffstats
path: root/source/lib/sendfile.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-09-14 01:38:55 +0000
committerJeremy Allison <jra@samba.org>2002-09-14 01:38:55 +0000
commit7e2f9769c9a7ee5d11267a8a8864371fc0aa8f50 (patch)
treec75853cb34d04f4be5bbad85fcf2e7e1c0c573af /source/lib/sendfile.c
parent872dfd87cda585c33c3823b06580cb301567a9b9 (diff)
downloadsamba-7e2f9769c9a7ee5d11267a8a8864371fc0aa8f50.tar.gz
samba-7e2f9769c9a7ee5d11267a8a8864371fc0aa8f50.tar.xz
samba-7e2f9769c9a7ee5d11267a8a8864371fc0aa8f50.zip
Use HAVE_SENDFILE64, not SENDFILE64.
Jeremy.
Diffstat (limited to 'source/lib/sendfile.c')
-rw-r--r--source/lib/sendfile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/lib/sendfile.c b/source/lib/sendfile.c
index 2707495d5b3..4613cfb864b 100644
--- a/source/lib/sendfile.c
+++ b/source/lib/sendfile.c
@@ -59,7 +59,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
while (total) {
ssize_t nwritten;
do {
-#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(SENDFILE64)
+#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_SENDFILE64)
nwritten = sendfile64(tofd, fromfd, &offset, total);
#else
nwritten = sendfile(tofd, fromfd, &offset, total);
@@ -133,8 +133,11 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
#elif defined(SOLARIS_SENDFILE_API)
+/* Hmmm. Can't find Solaris sendfile API docs.... Where is it ? */
ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count)
{
+ errno = ENOSYS;
+ return -1;
}
#elif defined(HPUX_SENDFILE_API)
@@ -171,7 +174,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
*/
do {
-#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(SENDFILE64)
+#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_SENDFILE64)
nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0);
#else
nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0);