summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-09-21 08:53:05 +0000
committerJeremy Allison <jra@samba.org>2002-09-21 08:53:05 +0000
commit515c1d42eec8d7c0a5eabeb72b274f5446012945 (patch)
tree771a86c5a0c106aea08c233237e979c847d04892 /source3/configure.in
parentc48bfd8ce840f81e00a2373ee19668208a62a404 (diff)
downloadsamba-515c1d42eec8d7c0a5eabeb72b274f5446012945.tar.gz
samba-515c1d42eec8d7c0a5eabeb72b274f5446012945.tar.bz2
samba-515c1d42eec8d7c0a5eabeb72b274f5446012945.zip
Merge back Richard's FreeBSD sendfile fixes.
Jeremy. (This used to be commit f4845b0213aec58e0f489eba5653aa7b3855610f)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in20
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 7ae8ac90d3..6b4f138747 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2777,17 +2777,23 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)]
#include <sys/socket.h>
#include <sys/uio.h>],
[\
- int fromfd, tofd;
+#define NULL (void *)0
+ int fromfd, tofd, ret, total;
off_t offset, nwritten;
- struct sf_hdtr hdr;
+ struct sf_hdtr {
+ struct iovec *headers;
+ int hdr_cnt;
+ struct iovec *trailers;
+ int trl_cnt;
+ } hdr;
struct iovec hdtrl;
- hdr->headers = &hdtrl;
- hdr->hdr_cnt = 1;
- hdr->trailers = NULL;
- hdr->trl_cnt = 0;
+ hdr.headers = &hdtrl;
+ hdr.hdr_cnt = 1;
+ hdr.trailers = NULL;
+ hdr.trl_cnt = 0;
hdtrl.iov_base = NULL;
hdtrl.iov_len = 0;
- int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
+ ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
],
samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)])