diff --git a/cocoa.m b/cocoa.m
index 55ff2b4..14a3004 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -23,11 +23,17 @@
   */

  #import <Cocoa/Cocoa.h>
-
  #include "qemu-common.h"
  #include "console.h"
  #include "sysemu.h"

+#ifndef MAC_OS_X_VERSION_10_4
+#define MAC_OS_X_VERSION_10_4 1040
+#endif
+
+#ifndef __LITTLE_ENDIAN__
+#define __LITTLE_ENDIAN__ 0  /* assume PowerPC*/
+#endif

  //#define DEBUG

@@ -55,9 +61,13 @@ typedef struct {
  } QEMUScreen;

  int qemu_main(int argc, char **argv); // main defined in qemu/vl.c
+int cocoa_keycode_to_qemu(int keycode);
+
  NSWindow *normalWindow;
  id cocoaView;
  static DisplayChangeListener *dcl;
+BOOL qemuAtHighPriority;
+

  int gArgc;
  char **gArgv;
@@ -421,7 +431,7 @@ int cocoa_keycode_to_qemu(int keycode)
          [self ungrabMouse];
          [self setContentDimensions];
  // test if host support "enterFullScreenMode:withOptions" at  
compiletime
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
          if ([NSView respondsToSelector:@selector 
(exitFullScreenModeWithOptions:)]) { // test if  
