--- common/compat.c.orig	2014-10-04 10:54:43.000000000 -0700
+++ common/compat.c	2014-10-04 10:57:56.000000000 -0700
@@ -910,6 +910,7 @@
 	struct rlimit rl;
 #endif
 
+#ifndef __APPLE__
 	dir = opendir ("/proc/self/fd");
 	if (dir != NULL) {
 		while ((de = readdir (dir)) != NULL) {
@@ -932,6 +933,7 @@
 		closedir (dir);
 		return res;
 	}
+#endif
 
 	/* No /proc, brute force */
 #ifdef HAVE_SYS_RESOURCE_H