Skip to content
Snippets Groups Projects
Unverified Commit b0ba2de7 authored by Aaron Hill's avatar Aaron Hill
Browse files

Add Linux test

parent 457d6543
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ fn main() {
rustc_minor_version().expect("Failed to get rustc version");
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok();
let const_extern_fn_cargo_feature = env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok();
let libc_ci = env::var("LIBC_CI").is_ok();
if env::var("CARGO_FEATURE_USE_STD").is_ok() {
......@@ -72,6 +73,10 @@ fn main() {
if rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_thread_local");
}
if const_extern_fn_cargo_feature {
println!("cargo:rustc-cfg=libc_const_extern_fn");
}
}
fn rustc_minor_version() -> Option<u32> {
......
#![cfg(libc_const_extern_fn)] // If this does not hold, the file is empty
#[cfg(target_os = "linux")]
const _FOO: libc::c_uint = unsafe { libc::CMSG_SPACE(1) };
//^ if CMSG_SPACE is not const, this will fail to compile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment