From 7f0ef4fb4ad430190d143b0ed73fb3a68dde17fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Tue, 22 Feb 2011 21:36:35 +0100 Subject: [PATCH] s3-waf: add check for sendfile on AIX. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Guenther Autobuild-User: Günther Deschner Autobuild-Date: Tue Feb 22 22:36:53 CET 2011 on sn-devel-104 --- source3/wscript | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source3/wscript b/source3/wscript index d3b7916fe4d..99176ac2e15 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1453,6 +1453,29 @@ main() { conf.DEFINE('HAVE_SENDFILEV', '1') conf.DEFINE('SOLARIS_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') + elif (host_os.rfind('aix') > -1): + conf.CHECK_CODE(''' + #include + int fromfd, tofd; + size_t total=0; + struct sf_parms hdtrl; + ssize_t nwritten; + off64_t offset; + hdtrl.header_data = 0; + hdtrl.header_length = 0; + hdtrl.file_descriptor = fromfd; + hdtrl.file_offset = 0; + hdtrl.file_bytes = 0; + hdtrl.trailer_data = 0; + hdtrl.trailer_length = 0; + nwritten = send_file(&tofd, &hdtrl, 0); + ''', + '_HAVE_SENDFILE', + msg='Checking for AIX send_file support') + if conf.CONFIG_SET('_HAVE_SENDFILE'): + conf.DEFINE('HAVE_SENDFILE', '1') + conf.DEFINE('AIX_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 -- 2.11.4.GIT