<pre style='margin:0'>
Ryan Carsten Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/b054fd917070aba4e2051d9b0e7e48c10dbd9846">https://github.com/macports/macports-ports/commit/b054fd917070aba4e2051d9b0e7e48c10dbd9846</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new b054fd91707 php83: Fix zend_strnlen on 10.6 and earlier
</span>b054fd91707 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit b054fd917070aba4e2051d9b0e7e48c10dbd9846
</span>Author: Ryan Carsten Schmidt <ryandesign@macports.org>
AuthorDate: Mon Jan 8 00:35:34 2024 -0600
<span style='display:block; white-space:pre;color:#404040;'> php83: Fix zend_strnlen on 10.6 and earlier
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/69068
</span>---
lang/php/Portfile | 6 +++++-
lang/php/files/patch-php83-zend_strnlen.diff | 14 ++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/Portfile b/lang/php/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 645c6048dcd..bcfc7c2f9b1 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -445,7 +445,7 @@ subport ${php} {
</span> 8.0.30 {revision 0}
8.1.27 {revision 0}
8.2.14 {revision 0}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- 8.3.1 {revision 0}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 8.3.1 {revision 1}
</span> }
depends_run port:php_select
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -473,6 +473,10 @@ subport ${php} {
</span> patchfiles-append patch-${php}-icu-71.diff
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[vercmp ${branch} == 8.3]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-${php}-zend_strnlen.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if {[vercmp ${branch} 8.0] < 0} {
post-patch {
# Ensure the build date is the same for all universal archs.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/php/files/patch-php83-zend_strnlen.diff b/lang/php/files/patch-php83-zend_strnlen.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..42321c32950
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/php/files/patch-php83-zend_strnlen.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+zend_strnlen build fix when platform misses strnlen support.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/issues/12999
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/php/php-src/commit/a2068ef47b9aad8cd5c52cd11d0c0a65c3b13662
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/Zend/zend_operators.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/Zend/zend_operators.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -269,7 +269,7 @@ static zend_always_inline size_t zend_strnlen(const char* s, size_t maxlen)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(HAVE_STRNLEN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return strnlen(s, maxlen);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const char *p = memchr(s, '\0', maxlen);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const char *p = (const char *)memchr(s, '\0', maxlen);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return p ? p-s : maxlen;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span></pre><pre style='margin:0'>
</pre>