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/getrandom.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 libc/sysdeps/linux/common/getrandom.c (limited to 'libc/sysdeps/linux/common/getrandom.c') diff --git a/libc/sysdeps/linux/common/getrandom.c b/libc/sysdeps/linux/common/getrandom.c new file mode 100644 index 000000000..d33d5224a --- /dev/null +++ b/libc/sysdeps/linux/common/getrandom.c @@ -0,0 +1,14 @@ +/* vi: set sw=4 ts=4: */ +/* + * getrandom() for uClibc + * + * Copyright (C) 2015 Bernhard Reutner-Fischer + * + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. + */ + +#include +#include +#ifdef __NR_getrandom +_syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags) +#endif -- cgit v1.2.3