mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
17 lines
425 B
Diff
17 lines
425 B
Diff
--- bin/named/os.c.orig 2024-07-08 23:09:16
|
|
+++ bin/named/os.c 2024-07-25 10:59:00
|
|
@@ -635,7 +635,12 @@
|
|
return;
|
|
}
|
|
|
|
- rl.rlim_cur = rl.rlim_max;
|
|
+#if defined(__APPLE__)
|
|
+ /* asking for more than OPEN_MAX fails on some macOS versions */
|
|
+ rl.rlim_cur = (OPEN_MAX < rl.rlim_max ? OPEN_MAX : rl.rlim_max);
|
|
+#else
|
|
+ rl.rlim_cur = rl.rlim_max;
|
|
+#endif
|
|
r = setrlimit(RLIMIT_NOFILE, &rl);
|
|
if (r != 0) {
|
|
goto fail;
|