summaryrefslogtreecommitdiffstats
path: root/sys/sys/timeb.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-02-14 12:00:42 +0000
committered <ed@FreeBSD.org>2010-02-14 12:00:42 +0000
commit05944abaa4f550b6819bbdd2632c74c251ec3f31 (patch)
treecb21a79d5ce36755e795c0904e5f586214c08815 /sys/sys/timeb.h
parentdd595a026f4b98f04c03e3ecf949a2cd874b64ba (diff)
downloadFreeBSD-src-05944abaa4f550b6819bbdd2632c74c251ec3f31.zip
FreeBSD-src-05944abaa4f550b6819bbdd2632c74c251ec3f31.tar.gz
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.
Diffstat (limited to 'sys/sys/timeb.h')
-rw-r--r--sys/sys/timeb.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/sys/timeb.h b/sys/sys/timeb.h
index 2a88f6b..59aa466 100644
--- a/sys/sys/timeb.h
+++ b/sys/sys/timeb.h
@@ -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_ */
OpenPOWER on IntegriCloud