diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-10-06 15:27:36 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-10-06 15:27:36 +0300 |
commit | e3433d3d95f5a8cb1fa49b3ab9299ca0d7e2bcb2 (patch) | |
tree | d2fd105e5e9fce2378fd55e7768bf8a61f9a1420 /configure.cmake | |
parent | 5a95f5c3a80c3f37b33a6c761855be628b18ce70 (diff) | |
download | mariadb-git-bb-10.1-jan-encryption.tar.gz |
Add fallocate discovery to global case as we need it more thanbb-10.1-jan-encryption
one place.
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index 5efd0f5c14b..1dade02aa32 100644 --- a/configure.cmake +++ b/configure.cmake @@ -1058,3 +1058,22 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_IN CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN) SET(SPRINTF_RETURNS_INT 1) CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H) + +IF(NOT MSVC) + CHECK_C_SOURCE_RUNS( + " + #define _GNU_SOURCE + #include <fcntl.h> + #include <linux/falloc.h> + int main() + { + /* Ignore the return value for now. Check if the flags exist. + The return value is checked at runtime. */ + fallocate(0, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 0); + + return(0); + }" + HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE + ) +ENDIF() + |