From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Maddock <smaddock@slack-corp.com>
Date: Wed, 8 Oct 2025 10:50:03 -0400
Subject: fix: redefined macos sdk header symbols

https://chromium-review.googlesource.com/c/chromium/src/+/6950738

Chromium has set the minimum MacOS SDK version to 26. With this
change, it seems to introduce an incompatibility when compiling
using clang modules. Disabling them resolves the issue.

diff --git a/unofficial.gni b/unofficial.gni
index def9a302830e493e51cc2b3588816fcbd3a1bb51..900c5e4d8a48d0725420518c923c7024518158b8 100644
--- a/unofficial.gni
+++ b/unofficial.gni
@@ -197,6 +197,10 @@ template("node_gn_build") {
         "CoreFoundation.framework",
         "Security.framework",
       ]
+
+      # Fix for MacOSX26 SDK headers included twice due to usage of clang
+      # modules. Included once as a C header and again as C++.
+      use_libcxx_modules = false
     }
     if (is_posix) {
       configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
@@ -369,6 +373,12 @@ template("node_gn_build") {
     include_dirs = [ "src", "tools" ]
     configs += [ "//build/config/compiler:no_exit_time_destructors" ]
 
+    # Fix for MacOSX26 SDK headers included twice due to usage of clang modules.
+    # Included once as a C header and again as C++.
+    if (is_mac) {
+      use_libcxx_modules = false
+    }
+
     if (!is_win) {
       defines += [ "NODE_JS2C_USE_STRING_LITERALS" ]
     }
