From 5643900913f64c00f1c2958914586708efa5a473 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 17 Apr 2012 09:30:15 +0200 Subject: libc: add posix_fallocate() Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/bits/kernel-features.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h index 4d1e0cbc3..6184c2b9d 100644 --- a/libc/sysdeps/linux/common/bits/kernel-features.h +++ b/libc/sysdeps/linux/common/bits/kernel-features.h @@ -495,6 +495,14 @@ # define __ASSUME_PRIVATE_FUTEX 1 #endif +/* Support for fallocate was added in 2.6.23, + on s390 only after 2.6.23-rc1, on alpha only after 2.6.33-rc1. */ +#if __LINUX_KERNEL_VERSION >= 0x020617 \ + && (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618) \ + && (!defined __alpha__ || __LINUX_KERNEL_VERSION >= 0x020621) +# define __ASSUME_FALLOCATE 1 +#endif + /* getcpu is a syscall for x86-64 since 3.1. */ #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100 # define __ASSUME_GETCPU_SYSCALL 1 -- cgit v1.2.3