Index: main/app.c =================================================================== --- main/app.c (revision 215150) +++ main/app.c (working copy) @@ -2015,7 +2015,7 @@ struct rlimit rl; getrlimit(RLIMIT_NOFILE, &rl); null = open("/dev/null", O_RDONLY); - for (x = n + 1; x < rl.rlim_max; x++) { + for (x = n + 1; x < rl.rlim_cur; x++) { if (x != null) { /* Side effect of dup2 is that it closes any existing fd without error. * This prevents valgrind and other debugging tools from sending up Index: main/Makefile =================================================================== --- main/Makefile (revision 215150) +++ main/Makefile (working copy) @@ -44,7 +44,7 @@ ifneq ($(findstring darwin,$(OSARCH)),) AST_LIBS+=-lresolv - ASTLINK=-undefined suppress -force_flat_namespace + ASTLINK=-Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace else # These are used for all but Darwin ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)