diff options
Diffstat (limited to 'audio/mpg123/files/patch-ab')
-rw-r--r-- | audio/mpg123/files/patch-ab | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/audio/mpg123/files/patch-ab b/audio/mpg123/files/patch-ab index 164299b25200..76b32c339984 100644 --- a/audio/mpg123/files/patch-ab +++ b/audio/mpg123/files/patch-ab @@ -1,5 +1,5 @@ ---- mpg123.c.orig Fri Jun 18 14:18:11 1999 -+++ mpg123.c Fri May 5 00:07:02 2000 +--- mpg123.c.orig Fri Jun 18 05:18:11 1999 ++++ mpg123.c Fri Mar 2 16:08:04 2001 @@ -27,6 +27,10 @@ #include <sched.h> #endif @@ -11,6 +11,33 @@ #include "mpg123.h" #include "getlopt.h" #include "buffer.h" +@@ -223,7 +227,7 @@ + { + int loop, rannum; + +- srand(time(NULL)); ++ srandomdev(); + if(shuffleord) + free(shuffleord); + shuffleord = (int *) malloc((numfiles + 1) * sizeof(int)); +@@ -239,7 +243,7 @@ + /* now shuffle them */ + if(numfiles >= 2) { + for (loop = 0; loop < numfiles; loop++) { +- rannum = (rand() % (numfiles * 4 - 4)) / 4; ++ rannum = (random() % (numfiles * 4 - 4)) / 4; + rannum += (rannum >= loop); + shuffleord[loop] ^= shuffleord[rannum]; + shuffleord[rannum] ^= shuffleord[loop]; +@@ -381,7 +385,7 @@ + curfile++; + } + else { +- newfile = shufflist[ rand() % shuffle_listsize ]; ++ newfile = shufflist[ random() % shuffle_listsize ]; + } + + return newfile; @@ -784,6 +788,10 @@ _wildcard(&argc,&argv); #endif |