---
 sys/amd64/include/_types.h |   11 +++++++++--
 sys/i386/include/_types.h  |   12 +++++++++---
 2 files changed, 18 insertions(+), 5 deletions(-)

--- a/sys/i386/include/_types.h
+++ b/sys/i386/include/_types.h
@@ -39,12 +39,15 @@
 #ifndef _MACHINE__TYPES_H_
 #define	_MACHINE__TYPES_H_
 
+#include <sys/types.h>
+#include <sys/cdefs.h>
 #ifndef _SYS_CDEFS_H_
-#error this file needs sys/cdefs.h as a prerequisite
+#include <sys/param.h>
 #endif
 
 #define __NO_STRICT_ALIGNMENT
 
+#ifndef __GLIBC__
 /*
  * Basic types upon which most other types are built.
  */
@@ -69,18 +72,19 @@ typedef	long long		__int64_t;
 /* LONGLONG */
 typedef	unsigned long long	__uint64_t;
 #endif
-
+#endif /* __GLIBC__ */
 /*
  * Standard type definitions.
  */
-typedef	unsigned long	__clock_t;		/* clock()... */
 typedef	unsigned int	__cpumask_t;
 typedef	__int32_t	__critical_t;
 typedef	long double	__double_t;
 typedef	long double	__float_t;
 typedef	__int32_t	__intfptr_t;
 typedef	__int64_t	__intmax_t;
+#ifndef __GLIBC__
 typedef	__int32_t	__intptr_t;
+#endif
 typedef	__int32_t	__int_fast8_t;
 typedef	__int32_t	__int_fast16_t;
 typedef	__int32_t	__int_fast32_t;
@@ -92,9 +96,11 @@ typedef	__int64_t	__int_least64_t;
 typedef	__int32_t	__ptrdiff_t;		/* ptr1 - ptr2 */
 typedef	__int32_t	__register_t;
 typedef	__int32_t	__segsz_t;		/* segment size (in pages) */
+#ifndef __GLIBC__
 typedef	__uint32_t	__size_t;		/* sizeof() */
 typedef	__int32_t	__ssize_t;		/* byte count or error */
 typedef	__int32_t	__time_t;		/* time()... */
+#endif
 typedef	__uint32_t	__uintfptr_t;
 typedef	__uint64_t	__uintmax_t;
 typedef	__uint32_t	__uintptr_t;
--- a/sys/amd64/include/_types.h
+++ b/sys/amd64/include/_types.h
@@ -39,12 +39,15 @@
 #ifndef _MACHINE__TYPES_H_
 #define	_MACHINE__TYPES_H_
 
+#include <sys/types.h>
+#include <sys/cdefs.h>
 #ifndef _SYS_CDEFS_H_
-#error this file needs sys/cdefs.h as a prerequisite
+#include <sys/param.h>
 #endif
 
 #define __NO_STRICT_ALIGNMENT
 
+#ifndef __GLIBC__
 /*
  * Basic types upon which most other types are built.
  */
@@ -56,16 +59,18 @@ typedef	int			__int32_t;
 typedef	unsigned int		__uint32_t;
 typedef	long			__int64_t;
 typedef	unsigned long		__uint64_t;
+#endif /* __GLIBC__ */
 
 /*
  * Standard type definitions.
  */
-typedef	__int32_t	__clock_t;		/* clock()... */
 typedef	unsigned int	__cpumask_t;
 typedef	__int64_t	__critical_t;
 typedef	double		__double_t;
 typedef	float		__float_t;
+#ifndef __GLIBC__
 typedef	__int64_t	__intfptr_t;
+#endif
 typedef	__int64_t	__intmax_t;
 typedef	__int64_t	__intptr_t;
 typedef	__int32_t	__int_fast8_t;
@@ -79,9 +84,11 @@ typedef	__int64_t	__int_least64_t;
 typedef	__int64_t	__ptrdiff_t;		/* ptr1 - ptr2 */
 typedef	__int64_t	__register_t;
 typedef	__int64_t	__segsz_t;		/* segment size (in pages) */
+#ifndef __GLIBC__
 typedef	__uint64_t	__size_t;		/* sizeof() */
 typedef	__int64_t	__ssize_t;		/* byte count or error */
 typedef	__int64_t	__time_t;		/* time()... */
+#endif
 typedef	__uint64_t	__uintfptr_t;
 typedef	__uint64_t	__uintmax_t;
 typedef	__uint64_t	__uintptr_t;
