summaryrefslogtreecommitdiff
path: root/src/sys/sys_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/sys_unix.c')
-rw-r--r--src/sys/sys_unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sys/sys_unix.c b/src/sys/sys_unix.c
index dd77e0da..22af0fcf 100644
--- a/src/sys/sys_unix.c
+++ b/src/sys/sys_unix.c
@@ -116,6 +116,8 @@ qboolean Sys_RandomBytes( byte *string, int len )
if( !fp )
return qfalse;
+ setvbuf( fp, NULL, _IONBF, 0 ); // don't buffer reads from /dev/urandom
+
if( fread( string, sizeof( byte ), len, fp ) != len )
{
fclose( fp );