--- src/ld/parsers/lto_file.cpp.orig	2012-12-30 20:08:12.000000000 -0800
+++ src/ld/parsers/lto_file.cpp	2012-12-30 20:08:32.000000000 -0800
@@ -35,6 +35,8 @@
 #include <ext/hash_set>
 #include <ext/hash_map>
 
+#include <pthread.h>
+
 #include "MachOFileAbstraction.hpp"
 #include "Architectures.hpp"
 #include "ld.hpp"
--- src/other/rebase.cpp.orig	2013-02-08 09:28:44.000000000 -0800
+++ src/other/rebase.cpp	2013-02-08 09:29:01.000000000 -0800
@@ -29,6 +29,7 @@
 #include <limits.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <unistd.h>
