--- driver/main.c.orig
+++ driver/main.c
@@ -81,6 +81,10 @@
 extern const char*optarg;
 #endif
 
+#if defined(__APPLE__)
+#include <mach-o/dyld.h>
+#endif
+
 #if !defined(WIFEXITED)
 # define WIFEXITED(rc) ((rc&0x7f) == 0)
 #endif
