aboutsummaryrefslogtreecommitdiff
path: root/software/helloworld/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/helloworld/main.c')
-rw-r--r--software/helloworld/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/software/helloworld/main.c b/software/helloworld/main.c
new file mode 100644
index 0000000..126a97a
--- /dev/null
+++ b/software/helloworld/main.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <sys/random.h>
+
+int main(void) {
+ int x;
+
+ getrandom(&x, sizeof(typeof(x)), 0);
+ printf("Random number from the kernel: %d\n", x);
+
+ return 0;
+}
+