diff --git a/srogue/main.c b/srogue/main.c index c7c7606..2c71585 100644 --- a/srogue/main.c +++ b/srogue/main.c @@ -172,7 +172,7 @@ char **envp; /* START NEW GAME */ dnum = (wizard && getenv("SEED") != NULL ? - atoi(getenv("SEED")) : lowtime + getpid()); + atoi(getenv("SEED")) : lowtime + md_getpid()); if(wizard) printf("Hello %s, welcome to dungeon #%d\n", whoami, dnum); diff --git a/srogue/rogue.h b/srogue/rogue.h index ccb05e1..d171fe2 100644 --- a/srogue/rogue.h +++ b/srogue/rogue.h @@ -39,6 +39,16 @@ #include #endif +#ifndef uid_t +typedef unsigned int uid_t; +#endif +#ifndef gid_t +typedef unsigned int gid_t; +#endif +#ifndef pid_t +typedef int pid_t; +#endif + int md_chmod(const char *filename, int mode); char *md_crypt(const char *key, const char *salt); int md_dsuspchar(void); diff --git a/srogue/save.c b/srogue/save.c index 821ed1f..778258a 100644 --- a/srogue/save.c +++ b/srogue/save.c @@ -296,6 +296,6 @@ char *file, **envp; strcpy(file_name, file); setup(); restscr(cw); - md_srandom(getpid()); + md_srandom(md_getpid()); playit(); }