According to the documentation:
pub const unsafe extern "C" fn CMSG_SPACE(length: c_uint) -> c_uint
However, if I compile
fn main() {
let _ = [0u8; libc::CMSG_SPACE(1) as usize];
}
I get the following error:
error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
--> src/bin/libc-const.rs:2:27
|
2 | let _ = [0u8; unsafe {libc::CMSG_SPACE(1) as usize}];
| ^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0015`.