summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2018-04-30 15:14:34 +0200
committerAaron Marcher <me@drkhsh.at>2018-04-30 15:41:31 +0200
commit3cc649e34c61f557da885260d5542c805e66b0d8 (patch)
treec4a5a779c8a14896f8baa3d1c6fd203782c582d4 /components
parentf088dbfea06363a84533bb9f1a84f756c46bc3b2 (diff)
entropy: OS split
Diffstat (limited to 'components')
-rw-r--r--components/Linux/entropy.c (renamed from components/entropy.c)4
-rw-r--r--components/OpenBSD/entropy.c0
2 files changed, 1 insertions, 3 deletions
diff --git a/components/entropy.c b/components/Linux/entropy.c
index 65c65a1..17be270 100644
--- a/components/entropy.c
+++ b/components/Linux/entropy.c
@@ -1,8 +1,7 @@
/* See LICENSE file for copyright and license details. */
-#if defined(__linux__)
#include <stdio.h>
-#include "../util.h"
+#include "../../util.h"
const char *
entropy(void)
@@ -12,4 +11,3 @@ entropy(void)
return (pscanf("/proc/sys/kernel/random/entropy_avail", "%d", &num) == 1) ?
bprintf("%d", num) : NULL;
}
-#endif
diff --git a/components/OpenBSD/entropy.c b/components/OpenBSD/entropy.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/components/OpenBSD/entropy.c