From 8e1b5a9727e27e8d2188030750d56bae4bf5931d Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Fri, 4 Apr 2025 15:09:15 +0100 Subject: [PATCH] Fix Postgres build on macOS (#11442) ## Problem Postgres build fails with the following error on macOS: ``` /Users/bayandin/work/neon//vendor/postgres-v14/src/port/snprintf.c:424:27: error: 'strchrnul' is only available on macOS 15.4 or newer [-Werror,-Wunguarded-availability-new] 424 | const char *next_pct = strchrnul(format + 1, '%'); | ^~~~~~~~~ /Users/bayandin/work/neon//vendor/postgres-v14/src/port/snprintf.c:376:14: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0 376 | extern char *strchrnul(const char *s, int c); | ^ /Users/bayandin/work/neon//vendor/postgres-v14/src/port/snprintf.c:424:27: note: enclose 'strchrnul' in a __builtin_available check to silence this warning 424 | const char *next_pct = strchrnul(format + 1, '%'); | ^~~~~~~~~ 425 | 426 | /* Dump literal data we just scanned over */ 427 | dostr(format, next_pct - format, target); 428 | if (target->failed) 429 | break; 430 | 431 | if (*next_pct == '\0') 432 | break; 433 | format = next_pct; | 1 error generated. ``` ## Summary of changes - Update Postgres fork to include changes from https://github.com/postgres/postgres/commit/6da2ba1d8a031984eb016fed6741bb2ac945f19d Corresponding Postgres PRs: - https://github.com/neondatabase/postgres/pull/608 - https://github.com/neondatabase/postgres/pull/609 - https://github.com/neondatabase/postgres/pull/610 - https://github.com/neondatabase/postgres/pull/611 --- vendor/postgres-v14 | 2 +- vendor/postgres-v15 | 2 +- vendor/postgres-v16 | 2 +- vendor/postgres-v17 | 2 +- vendor/revisions.json | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vendor/postgres-v14 b/vendor/postgres-v14 index bce3e48d8a..8cca70c22e 160000 --- a/vendor/postgres-v14 +++ b/vendor/postgres-v14 @@ -1 +1 @@ -Subproject commit bce3e48d8a72e70e72dfee1b7421fecd0f1b00ac +Subproject commit 8cca70c22e2894dd4645f9a940086ac437b0a11b diff --git a/vendor/postgres-v15 b/vendor/postgres-v15 index 4ac24a747c..23708b3aca 160000 --- a/vendor/postgres-v15 +++ b/vendor/postgres-v15 @@ -1 +1 @@ -Subproject commit 4ac24a747cd897119ce9b20547b3b04eba2cacbd +Subproject commit 23708b3aca9adf163aa0973eb63d9afc0e4a04c3 diff --git a/vendor/postgres-v16 b/vendor/postgres-v16 index 26c7d3f6de..746bd9ffe5 160000 --- a/vendor/postgres-v16 +++ b/vendor/postgres-v16 @@ -1 +1 @@ -Subproject commit 26c7d3f6de6f361c8923bb80d7563853b4a04958 +Subproject commit 746bd9ffe5c29bce030eaea1031054057f3c5d45 diff --git a/vendor/postgres-v17 b/vendor/postgres-v17 index 7ec41bf6cd..c9e4ff5a38 160000 --- a/vendor/postgres-v17 +++ b/vendor/postgres-v17 @@ -1 +1 @@ -Subproject commit 7ec41bf6cd92a4af751272145fdd590270c491da +Subproject commit c9e4ff5a38907acd71107634055bf2609aba43a5 diff --git a/vendor/revisions.json b/vendor/revisions.json index 0f581dc79e..2abfbffccb 100644 --- a/vendor/revisions.json +++ b/vendor/revisions.json @@ -1,18 +1,18 @@ { "v17": [ "17.4", - "7ec41bf6cd92a4af751272145fdd590270c491da" + "c9e4ff5a38907acd71107634055bf2609aba43a5" ], "v16": [ "16.8", - "26c7d3f6de6f361c8923bb80d7563853b4a04958" + "746bd9ffe5c29bce030eaea1031054057f3c5d45" ], "v15": [ "15.12", - "4ac24a747cd897119ce9b20547b3b04eba2cacbd" + "23708b3aca9adf163aa0973eb63d9afc0e4a04c3" ], "v14": [ "14.17", - "bce3e48d8a72e70e72dfee1b7421fecd0f1b00ac" + "8cca70c22e2894dd4645f9a940086ac437b0a11b" ] }