Closed
Description
Following the update to MacOS 15.4 build/tests are broken:
$ go test ./...
# github.com/pganalyze/pg_query_go/v6/parser
src_port_snprintf.c:374:1: error: static declaration of 'strchrnul' follows non-static declaration
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: previous declaration is here
src_port_snprintf.c:438:27: warning: 'strchrnul' is only available on macOS 15.4 or newer [-Wunguarded-availability-new]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0
src_port_snprintf.c:438:27: note: enclose 'strchrnul' in a __builtin_available check to silence this warning
FAIL github.com/pganalyze/pg_query_go/v6 [build failed]
FAIL github.com/pganalyze/pg_query_go/v6/parser [build failed]
FAIL
I have found the same issue seems to be present upstream on the pgsql mailing list: https://www.postgresql.org/message-id/385134.1743523038%40sss.pgh.pa.us.
Potential upstream fix: postgres/postgres@6da2ba1
Host Info:
$ uname -a
Darwin XXXXXX 24.4.0 Darwin Kernel Version 24.4.0: Wed Mar 19 21:17:32 PDT 2025; root:xnu-11417.101.15~1/RELEASE_ARM64_T6030 arm64
$ sw_vers -productVersion
15.4
Metadata
Metadata
Assignees
Labels
No labels