summaryrefslogtreecommitdiffstats
path: root/rogue/machdep.c
diff options
context:
space:
mode:
authorhubertf <hubertf@NetBSD.org>1998-07-21 07:01:54 +0000
committerhubertf <hubertf@NetBSD.org>1998-07-21 07:01:54 +0000
commit56e441081ab7a3c68356451ea421a474435db54c (patch)
treea67db260d33d723ff99e46f645ef5c3a6c3962d6 /rogue/machdep.c
parent4b973b99b26ebfe9f372367f03ac93522313fac8 (diff)
downloadbsdgames-darwin-56e441081ab7a3c68356451ea421a474435db54c.tar.gz
bsdgames-darwin-56e441081ab7a3c68356451ea421a474435db54c.tar.zst
bsdgames-darwin-56e441081ab7a3c68356451ea421a474435db54c.zip
As per PR bin/5806 by Joseph Myers <jsm28@cam.ac.uk>/lash@tellabs.com:
- Init Random by time, not by pid - Fix lossage with fire-spitting, monster-killing dragons
Diffstat (limited to 'rogue/machdep.c')
-rw-r--r--rogue/machdep.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/rogue/machdep.c b/rogue/machdep.c
index c195cae6..cde2bbb1 100644
--- a/rogue/machdep.c
+++ b/rogue/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.6 1997/10/12 11:45:19 lukem Exp $ */
+/* $NetBSD: machdep.c,v 1.7 1998/07/21 07:01:54 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)machdep.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: machdep.c,v 1.6 1997/10/12 11:45:19 lukem Exp $");
+__RCSID("$NetBSD: machdep.c,v 1.7 1998/07/21 07:01:54 hubertf Exp $");
#endif
#endif /* not lint */
@@ -432,7 +432,10 @@ md_malloc(n)
int
md_gseed()
{
- return(getpid());
+ time_t seconds;
+
+ time(&seconds);
+ return((int) seconds);
}
/* md_exit():