From 5ae008462182d3a375f126686aa7acbeaf39032c Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 13 Dec 2006 01:08:14 +0000 Subject: [PATCH] C89 fix (SF#1613348: http://sourceforge.net/tracker/index.php?func=detail&aid=1613348&group_id=13478&atid=313478) --- src/test_streams/main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/test_streams/main.c b/src/test_streams/main.c index 526c7578..a8647833 100644 --- a/src/test_streams/main.c +++ b/src/test_streams/main.c @@ -730,13 +730,15 @@ int main(int argc, char *argv[]) is_big_endian_host = (*((FLAC__byte*)(&test)))? false : true; #if !defined _MSC_VER && !defined __MINGW32__ - struct timeval tv; + { + struct timeval tv; - if(gettimeofday(&tv, 0) < 0) { - fprintf(stderr, "WARNING: couldn't seed RNG with time\n"); - tv.tv_usec = 4321; + if(gettimeofday(&tv, 0) < 0) { + fprintf(stderr, "WARNING: couldn't seed RNG with time\n"); + tv.tv_usec = 4321; + } + srandom(tv.tv_usec); } - srandom(tv.tv_usec); #else srand(time(0)); #endif