This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit c9608fa1df63d8c1da7f2465d18218ce36ed941c Author: Jim Jagielski <[email protected]> AuthorDate: Thu Jun 11 15:40:22 2026 -0400 Fix macOS build with Clang 16+ (Xcode 15+): pin C dialect to gnu89 Clang 16+ removed support for K&R-style function definitions and implicit-int, turning them from warnings into hard errors. Much of the in-tree legacy C (e.g. soltools/mkdepend) is old-style and fails to compile with errors like 'unknown type name'. EXTERNAL_WARNINGS_NOT_ERRORS does not help since this is a parse-level rejection. Pin CFLAGSCC to -std=gnu89 in unxmacc.mk (the base file included by the Intel, x, and arm64 mac platform makefiles) so the fix applies tree-wide. This is symmetric with the existing -std=gnu++98 C++ pin, and gnu89 still permits later constructs as GNU extensions so it does not break modern C. --- main/solenv/inc/unxmacc.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/solenv/inc/unxmacc.mk b/main/solenv/inc/unxmacc.mk index f0406077d8..5171a6be45 100644 --- a/main/solenv/inc/unxmacc.mk +++ b/main/solenv/inc/unxmacc.mk @@ -87,7 +87,12 @@ CFLAGS+=-Wno-deprecated-declarations # Compilation flags # --------------------------------- # Normal C compilation flags -CFLAGSCC=-pipe -fsigned-char +# Clang 16+ (Xcode 15+) removed support for K&R-style function definitions and +# implicit-int, turning them from warnings into hard errors. Much of the +# in-tree C is old-style, so pin the C dialect to gnu89 (symmetric with the +# gnu++98 C++ pin). gnu89 still permits later constructs as GNU extensions, so +# it does not break modern C modules. +CFLAGSCC=-pipe -fsigned-char -std=gnu89 # Normal Objective C compilation flags #OBJCFLAGS=-no-precomp
