* darwin_stop_world.c: Use the target macros from Apple to figure
out what flavor of darwin we're compiling against.
# if defined(GC_DARWIN_THREADS)
+#if __APPLE__
+#include "TargetConditionals.h"
+#endif
+
#include <AvailabilityMacros.h>
#include "mono/utils/mono-compiler.h"
if(r != KERN_SUCCESS) continue;
#if defined(I386)
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+#if defined (TARGET_IPHONE_SIMULATOR) || (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5)
lo = state.__esp;