From 3ae438d9b0cbcabd9f5d7699f74ec761969e00c9 Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:16:45 +0530 Subject: [PATCH 1/9] Exclude Apple platforms from _XOPEN_SOURCE definition _XOPEN_SOURCE 500 was added in #266 to fix a QNX-specific compile error. On Apple platforms, defining it lowers __DARWIN_C_LEVEL, hiding C11 additions like quick_exit/at_quick_exit. GCC 15's libstdc++ unconditionally re-exports these symbols, which fails to compile when they're hidden by this macro. Add __APPLE__ to the existing exclusion list alongside FreeBSD and OpenBSD, consistent with how those platforms are already handled. See abseil/abseil-cpp#2095 --- src/time_zone_format.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/time_zone_format.cc b/src/time_zone_format.cc index 7ecfec4..ec9367d 100644 --- a/src/time_zone_format.cc +++ b/src/time_zone_format.cc @@ -21,10 +21,10 @@ #endif #if HAS_STRPTIME -# if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +# if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \ + !defined(__APPLE__) # define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98). # endif -#endif #include "cctz/time_zone.h" From df478b42472d2d36d536f147e593f16f5dccba36 Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:19:01 +0530 Subject: [PATCH 2/9] Add temporary CI workflow to verify macOS GCC15 build --- .github/workflows/test-macos-gcc15.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/test-macos-gcc15.yml diff --git a/.github/workflows/test-macos-gcc15.yml b/.github/workflows/test-macos-gcc15.yml new file mode 100644 index 0000000..19e877b --- /dev/null +++ b/.github/workflows/test-macos-gcc15.yml @@ -0,0 +1,19 @@ +name: macOS GCC15 repro +on: + push: + branches: + - fix-265-exclude-apple-xopen-source + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Install GCC 15 + run: brew install gcc@15 + - name: Configure + run: | + mkdir build && cd build + cmake .. -DCMAKE_CXX_COMPILER=g++-15 -DCMAKE_C_COMPILER=gcc-15 + - name: Build + run: cmake --build build \ No newline at end of file From 4b55d9c4753c2cc19d024c446f821e6f756ba958 Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:26:02 +0530 Subject: [PATCH 3/9] Fix CI workflow: use mkdir -p to avoid build dir conflict --- .github/workflows/test-macos-gcc15.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-macos-gcc15.yml b/.github/workflows/test-macos-gcc15.yml index 19e877b..db6dbb9 100644 --- a/.github/workflows/test-macos-gcc15.yml +++ b/.github/workflows/test-macos-gcc15.yml @@ -13,7 +13,7 @@ jobs: run: brew install gcc@15 - name: Configure run: | - mkdir build && cd build + mkdir -p build && cd build cmake .. -DCMAKE_CXX_COMPILER=g++-15 -DCMAKE_C_COMPILER=gcc-15 - name: Build run: cmake --build build \ No newline at end of file From cc7915f3d7b0ab95e0abe212b656e91d602c031f Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:41:45 +0530 Subject: [PATCH 4/9] Fix CI workflow: rename build dir to avoid case-insensitive collision with Bazel BUILD file --- .github/workflows/test-macos-gcc15.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-macos-gcc15.yml b/.github/workflows/test-macos-gcc15.yml index db6dbb9..52cd7a6 100644 --- a/.github/workflows/test-macos-gcc15.yml +++ b/.github/workflows/test-macos-gcc15.yml @@ -13,7 +13,7 @@ jobs: run: brew install gcc@15 - name: Configure run: | - mkdir -p build && cd build + mkdir -p cmakebuild && cd cmakebuild cmake .. -DCMAKE_CXX_COMPILER=g++-15 -DCMAKE_C_COMPILER=gcc-15 - name: Build - run: cmake --build build \ No newline at end of file + run: cmake --build cmakebuild \ No newline at end of file From 5db169ab9528804e6ca087f3b56ad5136acc01d1 Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:45:07 +0530 Subject: [PATCH 5/9] Fix CI workflow: disable BUILD_TESTING to skip GTest/benchmark deps --- .github/workflows/test-macos-gcc15.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-macos-gcc15.yml b/.github/workflows/test-macos-gcc15.yml index 52cd7a6..925e483 100644 --- a/.github/workflows/test-macos-gcc15.yml +++ b/.github/workflows/test-macos-gcc15.yml @@ -14,6 +14,6 @@ jobs: - name: Configure run: | mkdir -p cmakebuild && cd cmakebuild - cmake .. -DCMAKE_CXX_COMPILER=g++-15 -DCMAKE_C_COMPILER=gcc-15 + cmake .. -DCMAKE_CXX_COMPILER=g++-15 -DCMAKE_C_COMPILER=gcc-15 -DBUILD_TESTING=OFF - name: Build run: cmake --build cmakebuild \ No newline at end of file From 2741f3ddcd5bba6ddfe733fdaf2665ec488e9677 Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:53:35 +0530 Subject: [PATCH 6/9] Fix missing #endif causing unterminated #if compile error --- src/time_zone_format.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/time_zone_format.cc b/src/time_zone_format.cc index ec9367d..f34b7bc 100644 --- a/src/time_zone_format.cc +++ b/src/time_zone_format.cc @@ -25,6 +25,7 @@ !defined(__APPLE__) # define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98). # endif +#endif #include "cctz/time_zone.h" From 433ab0eaca7dd2f483641eabcfc0e14f3c4432ca Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:57:26 +0530 Subject: [PATCH 7/9] Revert "Exclude Apple platforms from _XOPEN_SOURCE definition" This reverts commit 3ae438d9b0cbcabd9f5d7699f74ec761969e00c9. --- src/time_zone_format.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/time_zone_format.cc b/src/time_zone_format.cc index f34b7bc..7ecfec4 100644 --- a/src/time_zone_format.cc +++ b/src/time_zone_format.cc @@ -21,8 +21,7 @@ #endif #if HAS_STRPTIME -# if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \ - !defined(__APPLE__) +# if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) # define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98). # endif #endif From 17e4ac9e963286c500fee1c6fb7fc4fa308ca77b Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 21:59:51 +0530 Subject: [PATCH 8/9] Reapply "Exclude Apple platforms from _XOPEN_SOURCE definition" This reverts commit 433ab0eaca7dd2f483641eabcfc0e14f3c4432ca. --- src/time_zone_format.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/time_zone_format.cc b/src/time_zone_format.cc index 7ecfec4..f34b7bc 100644 --- a/src/time_zone_format.cc +++ b/src/time_zone_format.cc @@ -21,7 +21,8 @@ #endif #if HAS_STRPTIME -# if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +# if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \ + !defined(__APPLE__) # define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98). # endif #endif From e4d83b97dda2a6bab2c16673b66bbf99ccf8e2c1 Mon Sep 17 00:00:00 2001 From: DrishtiTripathi2230 Date: Sun, 28 Jun 2026 22:08:13 +0530 Subject: [PATCH 9/9] Remove temporary CI verification workflow --- .github/workflows/test-macos-gcc15.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/test-macos-gcc15.yml diff --git a/.github/workflows/test-macos-gcc15.yml b/.github/workflows/test-macos-gcc15.yml deleted file mode 100644 index 925e483..0000000 --- a/.github/workflows/test-macos-gcc15.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: macOS GCC15 repro -on: - push: - branches: - - fix-265-exclude-apple-xopen-source - -jobs: - build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - name: Install GCC 15 - run: brew install gcc@15 - - name: Configure - run: | - mkdir -p cmakebuild && cd cmakebuild - cmake .. -DCMAKE_CXX_COMPILER=g++-15 -DCMAKE_C_COMPILER=gcc-15 -DBUILD_TESTING=OFF - - name: Build - run: cmake --build cmakebuild \ No newline at end of file