diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-03-22 14:47:29 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-03-22 14:49:27 +0100 |
commit | 09ff424905d5de0b2a21a3960d9756a90b07ba26 (patch) | |
tree | b927d20d8fa53c98cc5b08b6826096d43c387d28 /libc/sysdeps/linux/common/bits/kernel-features.h | |
parent | 534f44d53146457b3ca686c47efb9207543b88e1 (diff) |
libc: add getrandom(2)
Introduce a <sys/random.h> for it.
/* FIXME: aren't there a couple of __restrict and const missing ?
*/
extern int getrandom(void *__buf, size_t count, unsigned int flags)
__nonnull ((1)) __wur;
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common/bits/kernel-features.h')
-rw-r--r-- | libc/sysdeps/linux/common/bits/kernel-features.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h index 6184c2b9d..708bb4906 100644 --- a/libc/sysdeps/linux/common/bits/kernel-features.h +++ b/libc/sysdeps/linux/common/bits/kernel-features.h @@ -507,3 +507,8 @@ #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100 # define __ASSUME_GETCPU_SYSCALL 1 #endif + +/* getrandom syscall (widely) appeared around 4.0.0 */ +#if __LINUX_KERNEL_VERSION >= 0x040000 +# define __ASSUME_GETRANDOM_SYSCALL 1 +#endif |