Don't crash when uname fails

#385
This commit is contained in:
Linus Dierheimer
2023-01-14 16:38:34 +01:00
parent 1a710e4094
commit 026424ab8c
+3 -1
View File
@@ -192,7 +192,9 @@ static void initState(FFstate* state)
#else
state->passwd = ffGetPasswd();
#endif
uname(&state->utsname);
if(uname(&state->utsname) != 0)
memset(&state->utsname, 0, sizeof(struct utsname));
initConfigDirs(state);
initDataDirs(state);