From ecca5720a98f80b61ef643b64f3b2ee7c16928b3 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 7 Nov 2022 13:26:52 +1100 Subject: [PATCH] [host] app: ensure that `rand` will be random --- host/src/app.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/host/src/app.c b/host/src/app.c index dc6a48e9..527f1e82 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -721,6 +721,9 @@ int app_main(int argc, char * argv[]) if (!installCrashHandler(os_getExecutable())) DEBUG_WARN("Failed to install the crash handler"); + // make sure rng is actually seeded for LGMP + srand((unsigned)time(NULL)); + app.state = APP_STATE_RUNNING; ivshmemOptionsInit();