aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-17 18:06:30 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-17 18:06:30 +0100
commitd9d996c5caf7d4332f41f06aa44806fe9d33fe96 (patch)
tree00d68eec4f59c4c3fb2f4dd1388f930c6ce6e8f0
parent62b038cde3c8178b62ecbae1237046bec80dff4f (diff)
srandomdev monkeypatch
-rw-r--r--main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.c b/main.c
index 557dc77..f73afe1 100644
--- a/main.c
+++ b/main.c
@@ -118,6 +118,13 @@ static bool server_socket_callback(int fd){
return false;
}
+#ifndef __APPLE__
+#include <sys/time.h>
+void srandomdev(void){
+ srandom(time(NULL));
+}
+#endif
+
int main(void){
srandomdev();