Skip to content

Commit 5ef7f88

Browse files
oschwaldclaude
andcommitted
Remove -std=c99 from default CI builds
Our CI was using -std=c99 for all builds, which causes Darwin headers to hide BSD extension symbols. This masked the bswap32/bswap64 macro collision reported in #419, since real-world users (e.g. Homebrew) build without -std=c99 and see the conflict. Remove -std=c99 from the default CFLAGS so the main CI matrix matches what downstream consumers build with. Add a dedicated strict-C99 matrix entry (ubuntu/gcc) to preserve language compliance checking. Also change CMAKE_C_EXTENSIONS from OFF to ON to match default CMake behavior and what users get when building with cmake. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a291335 commit 5ef7f88

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
os: [ubuntu-latest, macos-latest]
1313
cc: [gcc, clang]
1414
posix: ['', -D_POSIX_C_SOURCE=200112L]
15+
include:
16+
- os: ubuntu-latest
17+
cc: gcc
18+
posix: '-std=c99'
1519
name: Autotools build on ${{matrix.os}} using ${{matrix.cc}} ${{matrix.posix}}
1620
runs-on: ${{ matrix.os }}
1721
env:
@@ -29,7 +33,7 @@ jobs:
2933
- run: ./bootstrap
3034
- run: ./configure
3135
env:
32-
CFLAGS: -std=c99 -Wall -Wextra -Werror -Wno-unused-function -Wno-unused-parameter ${{ matrix.posix }}
36+
CFLAGS: -Wall -Wextra -Werror -Wno-unused-function -Wno-unused-parameter ${{ matrix.posix }}
3337
- run: make
3438
- run: make check
3539

0 commit comments

Comments
 (0)