no "struct timezone" on Minix3, despite its manpage

This commit is contained in:
tg 2012-03-03 21:13:50 +00:00
parent aeaf3e27ef
commit bc039caa9f
1 changed files with 8 additions and 1 deletions

9
main.c
View File

@ -34,7 +34,7 @@
#include <locale.h> #include <locale.h>
#endif #endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.203 2012/02/11 22:45:04 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/main.c,v 1.204 2012/03/03 21:13:50 tg Exp $");
extern char **environ; extern char **environ;
@ -111,7 +111,10 @@ rndsetup(void)
void *dataptr, *stkptr, *mallocptr; void *dataptr, *stkptr, *mallocptr;
sigjmp_buf jbuf; sigjmp_buf jbuf;
struct timeval tv; struct timeval tv;
#if !defined(_MINIX)
/*XXX imake style */
struct timezone tz; struct timezone tz;
#endif
} *bufptr; } *bufptr;
char *cp; char *cp;
@ -131,7 +134,11 @@ rndsetup(void)
/* glibc pointer guard */ /* glibc pointer guard */
sigsetjmp(bufptr->jbuf, 1); sigsetjmp(bufptr->jbuf, 1);
/* introduce variation */ /* introduce variation */
#if !defined(_MINIX)
gettimeofday(&bufptr->tv, &bufptr->tz); gettimeofday(&bufptr->tv, &bufptr->tz);
#else
gettimeofday(&bufptr->tv, NULL);
#endif
NZATInit(h); NZATInit(h);
/* variation through pid, ppid, and the works */ /* variation through pid, ppid, and the works */