diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c index b06475d392a5..b3dd8b72c025 100644 --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -58,10 +58,10 @@ sleep(seconds) struct timespec time_remaining; if (seconds) { - time_to_sleep.ts_sec = seconds; - time_to_sleep.ts_nsec = 0; + time_to_sleep.tv_sec = seconds; + time_to_sleep.tv_nsec = 0; nanosleep(&time_to_sleep,&time_remaining); - seconds = time_remaining.ts_sec; + seconds = time_remaining.tv_sec; } return(seconds); #else diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c index 9e29f314d959..9a781e75a2de 100644 --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -60,8 +60,8 @@ usleep(useconds) struct timespec time_to_sleep; if (useconds) { - time_to_sleep.ts_nsec = (useconds % 1000000) * 1000; - time_to_sleep.ts_sec = useconds / 1000000; + time_to_sleep.tv_nsec = (useconds % 1000000) * 1000; + time_to_sleep.tsvsec = useconds / 1000000; nanosleep(&time_to_sleep,NULL); } #else