--- erts/emulator/hipe/hipe_amd64.c	2009-03-12 13:16:06.000000000 +0100
+++ erts/emulator/hipe/hipe_amd64.c	2009-09-02 19:54:51.000000000 +0200
@@ -37,6 +37,10 @@
 #undef ERL_FUN_SIZE
 #include "hipe_literals.h"
 
+#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
+#define __DARWIN__ 1
+#endif
+
 const Uint sse2_fnegate_mask[2] = {0x8000000000000000,0};
 
 void hipe_patch_load_fe(Uint64 *address, Uint64 value)
@@ -161,7 +165,7 @@
 		     MAP_PRIVATE|MAP_ANONYMOUS
 #if defined(MAP_32BIT)
 		     |MAP_32BIT
-#elif defined(__FreeBSD__) || defined(__sun__)
+#elif defined(__FreeBSD__) || defined(__sun__) || defined(__DARWIN__)
 		     |MAP_FIXED
 #endif
 		     ,
