summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-05-14 03:29:53 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:44 +0200
commitd6f8248cc33263cd78b9cad33e80e4ed8643fb6b (patch)
treed4a57b59ad842d3e86f02cd6fdd9bcd82614a89d /test
parent1c17b766a973a013c6967f792c60debb83721e9b (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.c12
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;
+}