From c1be5a32e8e9d130592355c97ebc89ddc5e81d7d Mon Sep 17 00:00:00 2001 From: Jianghua Yang Date: Thu, 19 Mar 2026 10:59:11 -0700 Subject: [PATCH] Fix build failure on macOS 26.2 SDK due to missing nl_langinfo_l declaration macOS 26.2 SDK changed langinfo.h to only expose nl_langinfo_l() when _USE_EXTENDED_LOCALES_ is defined, via xlocale/_langinfo.h. Previous SDK versions exposed it unconditionally. This caused a build error in chklocale.c: error: call to undeclared function 'nl_langinfo_l' Fix by explicitly including on Apple platforms, which declares nl_langinfo_l() regardless of _USE_EXTENDED_LOCALES_. --- src/port/chklocale.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/port/chklocale.c b/src/port/chklocale.c index 664eeab9050..4428b99d79e 100644 --- a/src/port/chklocale.c +++ b/src/port/chklocale.c @@ -21,6 +21,9 @@ #ifndef WIN32 #include +#ifdef __APPLE__ +#include /* provides nl_langinfo_l on macOS */ +#endif #endif #include "mb/pg_wchar.h" -- 2.50.1 (Apple Git-155)