diff --git a/src/core/misc.c b/src/core/misc.c index c80eacdd..3930d265 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -75,12 +75,13 @@ int32_t random(void) /************************************************************************** SLEEP **************************************************************************/ -void sleep(int secs) +unsigned int sleep(unsigned int secs) { unsigned long tmo; for (tmo = currticks()+secs*TICKS_PER_SEC; currticks() < tmo; ) { } + return 0; } /************************************************************************** @@ -89,7 +90,7 @@ INTERRUPTIBLE SLEEP void interruptible_sleep(int secs) { printf("\n"); - return sleep(secs); + sleep(secs); } /************************************************************************** diff --git a/src/include/etherboot.h b/src/include/etherboot.h index e5a18153..b26379c2 100644 --- a/src/include/etherboot.h +++ b/src/include/etherboot.h @@ -9,6 +9,7 @@ #include "compiler.h" #include "stddef.h" #include "stdint.h" +#include /* @@ -220,7 +221,6 @@ extern int load_block P((unsigned char *, unsigned int, unsigned int, int )); /* misc.c */ extern void twiddle P((void)); -extern void sleep P((int secs)); extern void interruptible_sleep P((int secs)); extern int strcasecmp P((const char *a, const char *b)); extern char *substr P((const char *a, const char *b)); diff --git a/src/include/unistd.h b/src/include/unistd.h index f3412d40..35dcf584 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -4,6 +4,7 @@ #include #include +extern unsigned int sleep ( unsigned int seconds ); extern int execv ( const char *command, char * const argv[] ); /**