diff options
Diffstat (limited to 'audio/xcdplayer/patches/patch-al')
-rw-r--r-- | audio/xcdplayer/patches/patch-al | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/audio/xcdplayer/patches/patch-al b/audio/xcdplayer/patches/patch-al index fe6cbb2797c..6b2def2d532 100644 --- a/audio/xcdplayer/patches/patch-al +++ b/audio/xcdplayer/patches/patch-al @@ -1,10 +1,12 @@ -$NetBSD: patch-al,v 1.5 2011/09/04 22:05:39 dholland Exp $ +$NetBSD: patch-al,v 1.5.6.1 2012/06/06 11:47:54 tron Exp $ - needs stdlib.h - needs time.h -- use malloc properly - support BSD cdrom interface - use the right debug on/off flag +- don't use own declarations of standard functions +- use malloc() properly +- call time() correctly --- shuffle.c.orig 1993-01-12 18:59:38.000000000 +0000 +++ shuffle.c @@ -23,7 +25,7 @@ $NetBSD: patch-al,v 1.5 2011/09/04 22:05:39 dholland Exp $ #ifdef sun # include "cdrom_sun.h" #endif -@@ -29,9 +34,10 @@ +@@ -29,15 +34,10 @@ static unsigned char *random_tracks; @@ -32,10 +34,16 @@ $NetBSD: patch-al,v 1.5 2011/09/04 22:05:39 dholland Exp $ void shuffle_setup() { - extern char *malloc(); - #ifdef sgi - extern time_t time(time_t *); - #else -@@ -63,7 +69,7 @@ shuffle_setup() { +-#ifdef sgi +- extern time_t time(time_t *); +-#else +- extern long time(); +-#endif +- extern long random(); + unsigned long seed, now; + char state[128]; + int try; +@@ -63,12 +63,12 @@ shuffle_setup() { random_tracks = NULL; } @@ -44,7 +52,13 @@ $NetBSD: patch-al,v 1.5 2011/09/04 22:05:39 dholland Exp $ perror("malloc"); exit(1); } -@@ -97,7 +103,7 @@ shuffle_setup() { + +- now = time((long *) 0); ++ now = time(NULL); + seed = now & 0xfff; + + initstate(seed, state, sizeof(state)); +@@ -97,7 +97,7 @@ shuffle_setup() { random_tracks[i] = try; } |