From 3e0fe4b1cc36f17626860176c1450bb0b31ca5cd Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Thu, 15 Feb 2001 16:15:30 +0000 Subject: Handle definition of struct timespec. --- include/sys/time.h | 11 +++++++++++ include/time.h | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/sys/time.h b/include/sys/time.h index 83be23fb4..f6fecc735 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -22,6 +22,17 @@ #include #include + +#if defined __USE_MISC || defined __USE_GNU +/* POSIX.4 structure for a time value. This is like a `struct timeval' but + has nanoseconds instead of microseconds. */ +struct timespec + { + long int tv_sec; /* Seconds. */ + long int tv_nsec; /* Nanoseconds. */ + }; +#endif + #include #define __need_timeval diff --git a/include/time.h b/include/time.h index 12d7e6c61..4d9781d5d 100644 --- a/include/time.h +++ b/include/time.h @@ -113,8 +113,6 @@ extern char * ctime_r __P((__const time_t *, char *)); extern struct tm* gmtime_r __P((__const time_t *, struct tm *)); extern struct tm* localtime_r __P((__const time_t *, struct tm *)); -struct timespec; - /* IEEE Std 1003.1b-1993. */ extern int nanosleep __P((__const struct timespec *__rqtp, struct timespec *__rmtp)); -- cgit v1.2.3