Make <sys/timeb.h> work without including <sys/types.h>.

According to the last POSIX specification that contained <sys/timeb.h>,
this header should also typedef time_t properly. Also add a proper
comment to the final #endif.
This commit is contained in:
ed 2010-02-14 12:00:42 +00:00
parent dd595a026f
commit 05944abaa4

View File

@ -38,6 +38,13 @@
#ifndef _SYS_TIMEB_H_
#define _SYS_TIMEB_H_
#include <sys/_types.h>
#ifndef _TIME_T_DECLARED
typedef __time_t time_t;
#define _TIME_T_DECLARED
#endif
/* The ftime(2) system call structure -- deprecated. */
struct timeb {
time_t time; /* seconds since the Epoch */
@ -54,4 +61,4 @@ int ftime(struct timeb *);
__END_DECLS
#endif /* _KERNEL */
#endif
#endif /* !_SYS_TIMEB_H_ */