aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();