diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-04-17 09:30:15 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-02-11 09:42:15 +0100 |
commit | 5643900913f64c00f1c2958914586708efa5a473 (patch) | |
tree | 4b0c5fcf655a00181098bbdfee1614fc119dd10a /libc/sysdeps/linux/common/bits | |
parent | 971db25812b6b7176f509a5f37964610a8f4b475 (diff) |
libc: add posix_fallocate()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common/bits')
-rw-r--r-- | libc/sysdeps/linux/common/bits/kernel-features.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |