aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2013-03-18 17:57:24 +0100
committerPatrik Nyblom <[email protected]>2013-03-18 17:57:24 +0100
commit4c13ffc749b4953a6aba519eccf13a2085f91bf9 (patch)
tree04901ae06c0fe94936fd7a8a7865015ca7f41968 /erts/configure.in
parent40a79961da84ad3c6f3f944cace806ac12161d40 (diff)
parent887577cfaeee55461f1e8f7b4f9472cbca1d2a2e (diff)
downloadotp-4c13ffc749b4953a6aba519eccf13a2085f91bf9.tar.gz
otp-4c13ffc749b4953a6aba519eccf13a2085f91bf9.tar.bz2
otp-4c13ffc749b4953a6aba519eccf13a2085f91bf9.zip
Merge branch 'maint'
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in20
1 files changed, 19 insertions, 1 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 7257751068..2ee907b6e4 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1082,8 +1082,26 @@ fi
AC_SUBST(ERTS_BUILD_SMP_EMU)
-AC_CHECK_FUNCS([posix_fadvise, fallocate])
+AC_CHECK_FUNCS([posix_fadvise])
AC_CHECK_HEADERS([linux/falloc.h])
+dnl * Old glibcs have broken fallocate64(). Make sure not to use it.
+AC_CACHE_CHECK([whether fallocate() works],i_cv_fallocate_works,[
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <linux/falloc.h>
+ ],
+ [
+ int fd = creat("conftest.temp", 0600);
+ fallocate(fd, FALLOC_FL_KEEP_SIZE,(off_t) 1024,(off_t) 1024);
+ ], i_cv_fallocate_works=yes, i_cv_fallocate_works=no)
+])
+if test $i_cv_fallocate_works = yes; then
+ AC_DEFINE(HAVE_FALLOCATE, 1, Define if you have a working fallocate())
+fi
dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
dnl * It may also be broken in AIX.