#ifndef _I386__ENDIAN_H_
#define _I386__ENDIAN_H_
+#include <sys/cdefs.h>
/*
* Define _NOQUAD if the compiler does NOT support 64-bit integers.
*/
#define __DARWIN_BYTE_ORDER __DARWIN_LITTLE_ENDIAN
-#if defined(KERNEL) || !defined(_POSIX_C_SOURCE)
+#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
#define BIG_ENDIAN __DARWIN_BIG_ENDIAN
#include <sys/_endian.h>
-#endif /* defined(KERNEL) || !defined(_POSIX_C_SOURCE) */
+#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */
#endif /* !_I386__ENDIAN_H_ */