--- common/compat.c.orig	2018-08-10 02:54:46.000000000 -0700
+++ common/compat.c	2018-08-11 11:21:11.000000000 -0700
@@ -912,6 +912,7 @@
 	struct rlimit rl;
 #endif
 
+#ifndef __APPLE__
 	dir = opendir ("/proc/self/fd");
 	if (dir != NULL) {
 		while ((de = readdir (dir)) != NULL) {
@@ -934,6 +935,7 @@
 		closedir (dir);
 		return res;
 	}
+#endif
 
 	/* No /proc, brute force */
 #ifdef HAVE_SYS_RESOURCE_H