diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-05-14 03:29:53 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:44 +0200 |
commit | d6f8248cc33263cd78b9cad33e80e4ed8643fb6b (patch) | |
tree | d4a57b59ad842d3e86f02cd6fdd9bcd82614a89d /test | |
parent | 1c17b766a973a013c6967f792c60debb83721e9b (diff) |
update arc4random from bug #885
Add config option to provide arc4random without device access.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/stdlib/testarc4random.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 <stdlib.h> +#include <stdio.h> + +int main(void) +{ +#ifdef __UCLIBC_HAS_ARC4RANDOM__ + int random_number; + random_number = arc4random() % 65536; + printf("%d\n", random_number); +#endif + return 0; +} |