<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/7444a46697f14ccd2f9e56d61566d6abe01cc68d">https://github.com/macports/macports-ports/commit/7444a46697f14ccd2f9e56d61566d6abe01cc68d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 7444a46697f14ccd2f9e56d61566d6abe01cc68d
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Thu Jul 25 12:45:39 2024 +1000
<span style='display:block; white-space:pre;color:#404040;'> bind9: fix runtime setrlimit error
</span>---
net/bind9/Portfile | 7 ++++---
net/bind9/files/setrlimit.patch | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/bind9/Portfile b/net/bind9/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0635ff50d1e..0f6418279ff 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/bind9/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/bind9/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,7 +6,7 @@ PortGroup compiler_blacklist_versions 1.0
</span>
name bind9
version 9.20.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories net
maintainers {geeklair.net:dluke @danielluke} {jmr @jmroot}
platforms darwin freebsd sunos
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,12 +52,13 @@ universal_variant \
</span> no
compiler.c_standard 2011
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Apple clang 15.0.0 from Xcode before 15.2 has a codgen bug that causes a crash in libisc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Apple clang 15.0.0 from Xcode before 15.2 has a codegen bug that causes a crash in libisc
</span> compiler.blacklist \
{clang >= 1500.0.40.1 < 1500.1.0.2.5 }
patchfiles atomics.patch \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- lib_dns_Makefile.in.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib_dns_Makefile.in.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ setrlimit.patch
</span>
# tests require `sudo bin/tests/system/ifconfig.sh up`
test.run yes
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/bind9/files/setrlimit.patch b/net/bind9/files/setrlimit.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..475499de59c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/bind9/files/setrlimit.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,16 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- bin/named/os.c.orig 2024-07-08 23:09:16
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ bin/named/os.c 2024-07-25 10:59:00
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -635,7 +635,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rl.rlim_cur = rl.rlim_max;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* asking for more than OPEN_MAX fails on some macOS versions */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rl.rlim_cur = (OPEN_MAX < rl.rlim_max ? OPEN_MAX : rl.rlim_max);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ rl.rlim_cur = rl.rlim_max;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ r = setrlimit(RLIMIT_NOFILE, &rl);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (r != 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto fail;
</span></pre><pre style='margin:0'>
</pre>