libc-rs/tests/const_fn.rs

6 lines
220 B
Rust
Raw Normal View History

2019-10-29 02:09:30 +01:00
#![cfg(libc_const_extern_fn)] // If this does not hold, the file is empty
#[cfg(target_os = "linux")]
2019-10-29 14:51:44 +01:00
const _FOO: libc::c_uint = unsafe { libc::CMSG_SPACE(1) };
2019-10-29 02:09:30 +01:00
//^ if CMSG_SPACE is not const, this will fail to compile