diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-06-05 14:35:15 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-06-05 09:48:05 +0200 |
commit | 659f588c7a0576d53688109d7d3fd24df9bdbde1 (patch) | |
tree | ecd04e1b1dd062ee31c137ca239e4594fb7a805f /source3/wscript | |
parent | fcd1aa82ac154677c085caf0ed5edf205544e341 (diff) | |
download | samba-659f588c7a0576d53688109d7d3fd24df9bdbde1.tar.gz samba-659f588c7a0576d53688109d7d3fd24df9bdbde1.tar.bz2 samba-659f588c7a0576d53688109d7d3fd24df9bdbde1.zip |
build: Add test for HAVE_BROKEN_POSIX_FALLOCATE to waf build
This was previously only in the autoconf build, added in 3264a98f.
Andrew Bartlett
Diffstat (limited to 'source3/wscript')
-rwxr-xr-x | source3/wscript | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript index 7136c47714..397718496a 100755 --- a/source3/wscript +++ b/source3/wscript @@ -803,6 +803,19 @@ int i; i = PAM_RADIO_TYPE; execute=True, msg='Checking whether fcntl locking is available') +# glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT. + if not conf.CHECK_CODE(''' +#define _XOPEN_SOURCE 600 +#include <stdlib.h> +#if defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 4)) +#error probably broken posix_fallocate +#endif +''', + '_HAVE_UNBROKEN_POSIX_FALLOCATE', + msg='for broken posix_fallocate'): + conf.DEFINE('HAVE_BROKEN_POSIX_FALLOCATE', '1') + + conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtim.tv_nsec', define='HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC') # Linux, Solaris conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtimensec', |