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:
parent
dd595a026f
commit
05944abaa4
@ -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_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user