From 09ff424905d5de0b2a21a3960d9756a90b07ba26 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 22 Mar 2015 14:47:29 +0100 Subject: libc: add getrandom(2) Introduce a 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 --- libc/sysdeps/linux/common/bits/kernel-features.h | 5 +++++ 1 file changed, 5 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 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 -- cgit v1.2.3