---
 sys/amd64/include/md_var.h |    2 ++
 sys/cam/scsi/scsi_all.h    |    1 +
 sys/i386/include/md_var.h  |    2 ++
 sys/sys/_mutex.h           |    2 ++
 sys/sys/_timeval.h         |    9 +--------
 sys/sys/bio.h              |    9 +++++++++
 sys/sys/devicestat.h       |    3 +++
 sys/sys/timespec.h         |    5 +----
 8 files changed, 21 insertions(+), 12 deletions(-)

--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -25,6 +25,7 @@
 #define	_SCSI_SCSI_ALL_H 1
 
 #include <sys/cdefs.h>
+#include <stdint.h>
 
 #ifdef _KERNEL
 /*
--- a/sys/i386/include/md_var.h
+++ b/sys/i386/include/md_var.h
@@ -32,6 +32,8 @@
 #ifndef _MACHINE_MD_VAR_H_
 #define	_MACHINE_MD_VAR_H_
 
+#include <sys/_types.h>
+
 /*
  * Miscellaneous machine-dependent declarations.
  */
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -32,6 +32,8 @@
 #ifndef _MACHINE_MD_VAR_H_
 #define	_MACHINE_MD_VAR_H_
 
+#include <sys/_types.h>
+
 /*
  * Miscellaneous machine-dependent declarations.
  */
--- a/sys/sys/_mutex.h
+++ b/sys/sys/_mutex.h
@@ -31,6 +31,8 @@
 #ifndef _SYS__MUTEX_H_
 #define	_SYS__MUTEX_H_
 
+#include <stdint.h>
+
 /*
  * Sleep/spin mutex.
  */
--- a/sys/sys/_timeval.h
+++ b/sys/sys/_timeval.h
@@ -30,6 +30,7 @@
 #define _SYS__TIMEVAL_H_
 
 #include <sys/_types.h>
+#include <sys/time.h>
 
 #ifndef _SUSECONDS_T_DECLARED
 typedef	__suseconds_t	suseconds_t;
@@ -41,12 +42,4 @@ typedef	__time_t	time_t;
 #define	_TIME_T_DECLARED
 #endif
 
-/*
- * Structure returned by gettimeofday(2) system call, and used in other calls.
- */
-struct timeval {
-	time_t		tv_sec;		/* seconds */
-	suseconds_t	tv_usec;	/* and microseconds */
-};
-
 #endif /* !_SYS__TIMEVAL_H_ */
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -39,6 +39,15 @@
 #define	_SYS_BIO_H_
 
 #include <sys/queue.h>
+#include <stdint.h>
+/* FIXME: this struct is copied from BSDish sys/time.h.  It should be somewhere else. (maybe Glibc?) */
+#ifndef bintime
+#define bintime bintime
+struct bintime {
+        time_t  sec;
+        uint64_t frac;
+};
+#endif
 
 /* bio_cmd */
 #define BIO_READ	0x01
--- a/sys/sys/devicestat.h
+++ b/sys/sys/devicestat.h
@@ -33,6 +33,9 @@
 
 #include <sys/queue.h>
 #include <sys/time.h>
+#include <sys/_types.h>
+#include <sys/resource.h>
+#include <stdint.h>
 
 /*
  * XXX: Should really be SPECNAMELEN
--- a/sys/sys/timespec.h
+++ b/sys/sys/timespec.h
@@ -43,10 +43,7 @@ typedef	__time_t	time_t;
 #define	_TIME_T_DECLARED
 #endif
 
-struct timespec {
-	time_t	tv_sec;		/* seconds */
-	long	tv_nsec;	/* and nanoseconds */
-};
+#include <sys/time.h>
 
 #if __BSD_VISIBLE
 #define	TIMEVAL_TO_TIMESPEC(tv, ts)					\
