Skip to content

Commit c031560

Browse files
committed
Explicitly set -std=gnu99 (via CMAKE_C_STANDARD) for linux targets when using the bundled feature.
1 parent ecd03de commit c031560

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sdl2-sys/build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ fn compile_sdl2(sdl2_build_path: &Path, target_os: &str) -> PathBuf {
128128
cfg.cflag("-fcommon");
129129
}
130130
}
131+
// The bundled SDL uses `bool`, `false`, and `true` which are reserved keywords in c23
132+
cfg.define("CMAKE_C_STANDARD", "99");
131133
}
132134
}
133135

0 commit comments

Comments
 (0)