diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index a38ac4999c..db29e8f0b9 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -549,11 +549,12 @@ void Sys_Sleep( int msec ) } else { + struct timespec req; + // With nothing to select() on, we can't wait indefinitely if( msec < 0 ) msec = 10; - struct timespec req; req.tv_sec = msec/1000; req.tv_nsec = (msec%1000)*1000000; nanosleep(&req, NULL);