diff options
author | Richard Sharpe <sharpe@samba.org> | 2002-12-27 22:55:11 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 2002-12-27 22:55:11 +0000 |
commit | b3c3701c0762e535a788b2328cfc212594c978c8 (patch) | |
tree | 7efd788751d8ede9aa654ee24a0c5c69ddc51022 /source3/configure.in | |
parent | ec07c8aed92a87028645c88decada7acc5bd832d (diff) | |
download | samba-b3c3701c0762e535a788b2328cfc212594c978c8.tar.gz samba-b3c3701c0762e535a788b2328cfc212594c978c8.tar.bz2 samba-b3c3701c0762e535a788b2328cfc212594c978c8.zip |
For some reason, the configure tests for sendfile support in FreeBSD
were broken. This works for 4.3 and 4.6.2.
(This used to be commit 91e2d21bd1401ca874c59f4d93f8b429c38b642d)
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/configure.in b/source3/configure.in index ee2997abe6..c5a8a069ee 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2845,20 +2845,21 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)] AC_CACHE_CHECK([for freebsd sendfile support],samba_cv_HAVE_SENDFILE,[ AC_TRY_LINK([\ #include <sys/types.h> +#include <unistd.h> #include <sys/socket.h> #include <sys/uio.h>], [\ - int fromfd, tofd; + int fromfd, tofd, ret, total=0; off_t offset, nwritten; struct sf_hdtr 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)]) |