From d6f8248cc33263cd78b9cad33e80e4ed8643fb6b Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 May 2011 03:29:53 +0200 Subject: update arc4random from bug #885 Add config option to provide arc4random without device access. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- test/stdlib/testarc4random.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/stdlib/testarc4random.c (limited to 'test') diff --git a/test/stdlib/testarc4random.c b/test/stdlib/testarc4random.c new file mode 100644 index 000000000..4d773aa4b --- /dev/null +++ b/test/stdlib/testarc4random.c @@ -0,0 +1,12 @@ +#include +#include + +int main(void) +{ +#ifdef __UCLIBC_HAS_ARC4RANDOM__ + int random_number; + random_number = arc4random() % 65536; + printf("%d\n", random_number); +#endif + return 0; +} -- cgit v1.2.3