diff options
author | Björn Jacke <bj@sernet.de> | 2009-12-04 23:26:47 +0100 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2009-12-04 23:29:56 +0100 |
commit | 3264a98ff16de899d11ef37b98a7d7a7c763fe22 (patch) | |
tree | 6a9429c89af375793e05485c1751adb8ebf0c954 /source3/configure.in | |
parent | 32915ceefc718621e2e9b17fee97da82744ab67a (diff) | |
download | samba-3264a98ff16de899d11ef37b98a7d7a7c763fe22.tar.gz samba-3264a98ff16de899d11ef37b98a7d7a7c763fe22.tar.bz2 samba-3264a98ff16de899d11ef37b98a7d7a7c763fe22.zip |
s3: check if glibc has broken posix_fallocate
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in index c7ad8e7d27..16fbf88be8 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2977,6 +2977,22 @@ exit(1); fi fi +# glibc up to 2.3.6 had dangerously broken posix_fallocate(). DON'T USE IT. +AC_CACHE_CHECK([for broken posix_fallocate],samba_cv_HAVE_BROKEN_POSIX_FALLOCATE,[ +AC_TRY_COMPILE([ + #define _XOPEN_SOURCE 600 + #include <stdlib.h> + #if defined(__GLIBC__) && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 4)) + probably broken posix_fallocate + #endif +], [ +], +samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=no,samba_cv_HAVE_BROKEN_POSIX_FALLOCATE=yes)]) +if test x"$samba_cv_HAVE_BROKEN_POSIX_FALLOCATE" = xyes; then + AC_DEFINE(HAVE_BROKEN_POSIX_FALLOCATE,, Whether we have a broken posix_fallocate) +fi + + AC_CACHE_CHECK([for st_blocks in struct stat],samba_cv_HAVE_STAT_ST_BLOCKS,[ AC_TRY_COMPILE([#include <sys/types.h> #include <sys/stat.h> |