Skip to content

Commit 0304ed5

Browse files
committed
Add a test that the const extern fn macro works
By default, any functions defined in this macro (such as `CMSG_SPACE`) should be `const`.
1 parent e0c4e5b commit 0304ed5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/const_fn.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#[cfg(target_os = "linux")]
2+
const _FOO: libc::c_uint = unsafe { libc::CMSG_SPACE(1) };
3+
//^ if CMSG_SPACE is not const, this will fail to compile

0 commit comments

Comments
 (0)