diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/Makefile | 2 | ||||
-rw-r--r-- | main/app.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/main/Makefile b/main/Makefile index ec8790de6..46f2301b1 100644 --- a/main/Makefile +++ b/main/Makefile @@ -44,7 +44,7 @@ endif 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)),) diff --git a/main/app.c b/main/app.c index f86885885..99dcfa677 100644 --- a/main/app.c +++ b/main/app.c @@ -2015,7 +2015,7 @@ void ast_close_fds_above_n(int n) 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 |