mirror of
https://git.freebsd.org/ports.git
synced 2025-05-14 16:21:50 -04:00
nslcd tries to close all file descriptors on startup. It does that by calling close() in a loop, running down from _SC_OPEN_MAX to 0. Since _SC_OPEN_MAX autoscales with available RAM, this can take more than a minute on large servers. The solution is to use closefrom. Upstream has already made that change in the master branch, but due to its slow release cadence we're applying it here as well. PR: 266970 Approved by: zi (maintainer) Sponsored by: Axcient
16 lines
407 B
Text
16 lines
407 B
Text
--- configure.orig 2021-11-20 13:07:41 UTC
|
|
+++ configure
|
|
@@ -9684,6 +9684,13 @@ then :
|
|
|
|
fi
|
|
|
|
+ ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom"
|
|
+if test "x$ac_cv_func_closefrom" = xyes
|
|
+then :
|
|
+ printf "%s\n" "#define HAVE_CLOSEFROM 1" >>confdefs.h
|
|
+
|
|
+fi
|
|
+
|
|
|
|
# replace some functions if they are not on the system
|
|
ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
|