diff --git a/games/phantasia/convert.c b/games/phantasia/convert.c index b18c5e9744f5..ace262acb17f 100644 --- a/games/phantasia/convert.c +++ b/games/phantasia/convert.c @@ -56,7 +56,7 @@ FILE *oldcharac, *newcharac; /* to open old and new files */ exit(1); } - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); while (fread((char *) &Oldplayer, sizeof(struct oldplayer), 1, oldcharac) == 1) /* read and convert old structures into new */ diff --git a/games/phantasia/include.h b/games/phantasia/include.h index bfaa8a7ede09..812b5a50f9cc 100644 --- a/games/phantasia/include.h +++ b/games/phantasia/include.h @@ -9,6 +9,7 @@ #include #include #include +#include #include "macros.h" #include "phantdefs.h" diff --git a/games/phantasia/main.c b/games/phantasia/main.c index 90ddcba7fd5c..3ed01ddd344e 100644 --- a/games/phantasia/main.c +++ b/games/phantasia/main.c @@ -367,7 +367,7 @@ initialstate() error(_PATH_VOID); /*NOTREACHED*/ - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); } /* */ /************************************************************************ diff --git a/games/phantasia/setup.c b/games/phantasia/setup.c index 330afb01cd32..5caac3d1cef1 100644 --- a/games/phantasia/setup.c +++ b/games/phantasia/setup.c @@ -4,7 +4,6 @@ #include "include.h" #include #include -#include #include /* */ /************************************************************************ @@ -75,7 +74,7 @@ main(argc, argv) argc -= optind; argv += optind; - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); umask(0117); /* only owner can read/write created files */