mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
s3-waf: add check for sendfile on freebsd.
Guenther
This commit is contained in:
parent
d71c024131
commit
2babc4fcf4
@ -1342,6 +1342,30 @@ main() {
|
||||
elif conf.CONFIG_SET('_HAVE_BROKEN_LINUX_SENDFILE'):
|
||||
conf.DEFINE('LINUX_BROKEN_SENDFILE_API', '1')
|
||||
conf.DEFINE('WITH_SENDFILE', '1')
|
||||
elif (host_os.rfind('freebsd') > -1) or (host_os.rfind('dragonfly') > -1):
|
||||
conf.CHECK_CODE('''
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/uio.h>
|
||||
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;
|
||||
hdtrl.iov_base = NULL;
|
||||
hdtrl.iov_len = 0;
|
||||
ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0)
|
||||
''',
|
||||
'_HAVE_SENDFILE',
|
||||
msg='Checking for freebsd sendfile support')
|
||||
if conf.CONFIG_SET('_HAVE_SENDFILE'):
|
||||
conf.DEFINE('HAVE_SENDFILE', '1')
|
||||
conf.DEFINE('FREEBSD_SENDFILE_API', '1')
|
||||
conf.DEFINE('WITH_SENDFILE', '1')
|
||||
|
||||
default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam
|
||||
auth_sam auth_unix auth_winbind auth_wbc auth_server
|
||||
|
Loading…
x
Reference in New Issue
Block a user