diff --git a/cocoa.m b/cocoa.m
index 56c789a..8126fe8 100644
--- a/cocoa.m
+++ b/cocoa.m
@@ -269,7 +269,7 @@ static int cocoa_keycode_to_qemu(int keycode)
 - (void) grabMouse;
 - (void) ungrabMouse;
 - (void) toggleFullScreen:(id)sender;
-- (void) handleEvent:(NSEvent *)event;
+- (BOOL) handleEvent:(NSEvent *)event;
 - (void) setAbsoluteEnabled:(BOOL)tIsAbsoluteEnabled;
 - (BOOL) isMouseGrabed;
 - (BOOL) isAbsoluteEnabled;
@@ -476,7 +476,7 @@ static int cocoa_keycode_to_qemu(int keycode)
     }
 }
 
-- (void) handleEvent:(NSEvent *)event
+- (BOOL) handleEvent:(NSEvent *)event
 {
     COCOA_DEBUG("QemuCocoaView: handleEvent\n");
 
@@ -514,7 +514,7 @@ static int cocoa_keycode_to_qemu(int keycode)
             // forward command Key Combos
             if ([event modifierFlags] & NSCommandKeyMask) {
                 [NSApp sendEvent:event];
-                return;
+                return YES;
             }
 
             // default
@@ -657,6 +657,7 @@ static int cocoa_keycode_to_qemu(int keycode)
         default:
             [NSApp sendEvent:event];
     }
+    return YES;
 }
 
 - (void) grabMouse
diff --git a/configure b/configure
index 36d028f..c4360c6 100755
--- a/configure
+++ b/configure
@@ -1198,7 +1198,11 @@ fi
 ##########################################
 # uuid_generate() probe, used for vdi block driver
 if test "$uuid" != "no" ; then
-  uuid_libs="-luuid"
+  if test "$darwin" == "yes"; then
+    uuid_libs=""
+  else
+    uuid_libs="-luuid"
+  fi
   cat > $TMPC << EOF
 #include <uuid/uuid.h>
 int main(void)
diff --git a/cpu-all.h b/cpu-all.h
index 47a5722..bdec3a0 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -21,6 +21,7 @@
 
 #include "qemu-common.h"
 #include "cpu-common.h"
+#include "qemu-timer.h"
 
 /* some important defines:
  *
diff --git a/qemu-thread.h b/qemu-thread.h
index 5ef4a3a..f7a1ddb 100644
--- a/qemu-thread.h
+++ b/qemu-thread.h
@@ -1,7 +1,7 @@
 #ifndef __QEMU_THREAD_H
 #define __QEMU_THREAD_H 1
-#include "semaphore.h"
-#include "pthread.h"
+#include <semaphore.h>
+#include <pthread.h>
 
 struct QemuMutex {
     pthread_mutex_t lock;
diff --git a/vl.c b/vl.c
index 85bcc84..d2c0b7c 100644
--- a/vl.c
+++ b/vl.c
@@ -114,6 +114,7 @@ int main(int argc, char **argv)
 #ifdef CONFIG_COCOA
 #undef main
 #define main qemu_main
+int qemu_main(int argc, char **argv, char **envp);
 #endif /* CONFIG_COCOA */
 
 #include "hw/hw.h"
