s3-waf: fix configure check for HAVE_POSIX_FADVISE.
[kai/samba.git] / source3 / wscript
index 1d40998adbad43a441d0d888e6aabe3ce43ed573..9ef42badca0ff808c50a723dd3fc74dfbc6e12b0 100644 (file)
@@ -1078,14 +1078,11 @@ exit(1);
                                define='HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC')
 
     conf.CHECK_CODE('''
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#include <fcntl.h>],
 ssize_t err = posix_fadvise(0,0,0x80000,POSIX_FADV_WILLNEED);
 ''',
                'HAVE_POSIX_FADVISE',
-               msg='Checking whether posix_fadvise is available')
+               msg='Checking whether posix_fadvise is available',
+               headers='unistd.h fcntl.h')
 
     for v in ['_SC_NGROUPS_MAX', '_SC_NPROC_ONLN', '_SC_NPROCESSORS_ONLN', '_SC_PAGESIZE' ]:
         conf.CHECK_CODE('''
@@ -1661,7 +1658,7 @@ main() {
         default_static_modules.extend(TO_LIST('pdb_ads auth_netlogond charset_weird'))
         default_shared_modules.extend(TO_LIST('perfcount_test'))
 
-    default_static_modules.extend(TO_LIST('pdb_samba4 auth_samba4'))
+    default_static_modules.extend(TO_LIST('pdb_samba4 auth_samba4 vfs_dfs_samba4'))
 
     if Options.options.with_acl_support and conf.CONFIG_SET('HAVE_POSIX_ACLS'):
         default_static_modules.extend(TO_LIST('vfs_posixacl'))