* src/vm/os.hpp: Includes above header with proper checking.
* src/threads/posix/thread-posix.cpp: Don't include above header directly.
* src/native/vm/gnuclasspath/java_lang_VMRuntime.cpp: Likewise.
AC_CHECK_HEADERS([time.h])
AC_CHECK_HEADERS([ucontext.h])
AC_CHECK_HEADERS([unistd.h])
+AC_CHECK_HEADERS([mach/mach.h])
AC_CHECK_HEADERS([sys/ioctl.h])
AC_CHECK_HEADERS([sys/loadavg.h])
AC_CHECK_HEADERS([sys/mman.h])
#include <stdlib.h>
#include <unistd.h>
-#if defined(__DARWIN__)
-# if defined(__POWERPC__)
-# define OS_INLINE /* required for <libkern/ppc/OSByteOrder.h> */
-# endif
-# include <mach/mach.h>
-#endif
-
#include "mm/memory.hpp"
#include "mm/gc.hpp"
#include "vm/jit/asmpart.h"
#if defined(__DARWIN__)
-# include <mach/mach.h>
typedef struct {
Mutex* mutex;
# include <unistd.h>
#endif
+#if defined(__DARWIN__)
+# if defined(HAVE_MACH_MACH_H)
+# include <mach/mach.h>
+# endif
+#endif
+
#if defined(HAVE_SYS_LOADAVG_H)
# include <sys/loadavg.h>
#endif