gnucash-on-osx master: [pgsql] Patch around strchrnul available in macOS 15.4 error.
John Ralls
jralls at code.gnucash.org
Mon Jun 9 15:11:15 EDT 2025
Updated via https://github.com/Gnucash/gnucash-on-osx/commit/216f8102 (commit)
from https://github.com/Gnucash/gnucash-on-osx/commit/39c8c3a7 (commit)
commit 216f8102d32dadb58077c931e2e6a5a3a8b57695
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Jun 9 12:11:04 2025 -0700
[pgsql] Patch around strchrnul available in macOS 15.4 error.
diff --git a/modulesets/gnucash.modules b/modulesets/gnucash.modules
index 42bbce7..cad930e 100644
--- a/modulesets/gnucash.modules
+++ b/modulesets/gnucash.modules
@@ -33,8 +33,8 @@
href="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/"
type="tarball" />
- <include href="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/modulesets-stable/gtk-osx.modules"/>
- <!--include href="/Users/john/Development/GTK-OSX/gtk-osx-build/modulesets-stable/gtk-osx.modules"/-->
+ <!--include href="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/modulesets-stable/gtk-osx.modules"/-->
+ <include href="/Users/john/Development/GTK-OSX/gtk-osx-build/modulesets-stable/gtk-osx.modules"/>
<meson id="shared-mime-info-2.2">
<branch module="2.2/shared-mime-info-2.2.tar.bz2"
@@ -158,10 +158,12 @@
</dependencies>
</autotools>
- <autotools id="pgsql">
+ <autotools id="pgsql"
+ autogenargs="ac_cv_func_strchrnul=no">
<branch repo="postgres" module="v16.3/postgresql-16.3.tar.bz2"
version="16.3"
hash="sha256:331963d5d3dc4caf4216a049fa40b66d6bcb8c730615859411b9518764e60585">
+ <patch file="pgsql-16.3-strchrnul.patch" strip="1"/>
</branch>
<dependencies>
<dep package="openssl"/>
diff --git a/patches/pgsql-16.3-strchrnul.patch b/patches/pgsql-16.3-strchrnul.patch
new file mode 100644
index 0000000..33a9b20
--- /dev/null
+++ b/patches/pgsql-16.3-strchrnul.patch
@@ -0,0 +1,34 @@
+diff -u /Users/john/Development/Gnucash-git-11.0-arm64/src/postgresql-16.3/src/port/snprintf.c\~ /Users/john/Development/Gnucash-git-11.0-arm64/src/postgresql-16.3/src/port/snprintf.c
+--- .3/src/port/snprintf.c 2024-05-06 13:21:25
++++ .3/src/port/snprintf.c 2025-06-09 11:51:03
+@@ -345,9 +345,9 @@
+ * casting away const internally, so we don't follow that detail.
+ */
+ #ifndef HAVE_STRCHRNUL
+-
++#define STRCHRNUL strchrnul_local
+ static inline const char *
+-strchrnul(const char *s, int c)
++strchrnul_local(const char *s, int c)
+ {
+ while (*s != '\0' && *s != c)
+ s++;
+@@ -355,6 +355,7 @@
+ }
+
+ #else
++#define STRCHRNUL strchrnul
+
+ /*
+ * glibc's <string.h> declares strchrnul only if _GNU_SOURCE is defined.
+@@ -411,7 +412,7 @@
+ if (*format != '%')
+ {
+ /* Scan to next '%' or end of string */
+- const char *next_pct = strchrnul(format + 1, '%');
++ const char *next_pct = STRCHRNUL(format + 1, '%');
+
+ /* Dump literal data we just scanned over */
+ dostr(format, next_pct - format, target);
+
+Diff finished. Mon Jun 9 11:53:35 2025
Summary of changes:
modulesets/gnucash.modules | 8 +++++---
patches/pgsql-16.3-strchrnul.patch | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 3 deletions(-)
create mode 100644 patches/pgsql-16.3-strchrnul.patch
More information about the gnucash-changes
mailing list