summaryrefslogtreecommitdiff
path: root/src/fuchsia
diff options
context:
space:
mode:
authorJohnTitor <huyuumi.dev@gmail.com>2021-03-30 15:28:55 +0900
committerJohnTitor <huyuumi.dev@gmail.com>2021-03-30 17:37:13 +0900
commite187543fddad0f252dae395508a47748dbf963e1 (patch)
tree5eb4fbb9973cd7cd7e37089732f7459f8ce520b1 /src/fuchsia
parentf913fc53a682c7b836bdf2ac0da601f2d8334b32 (diff)
downloadrust-libc-e187543fddad0f252dae395508a47748dbf963e1.tar.gz
Constify `CMSG_SPACE` for all the targets
Diffstat (limited to 'src/fuchsia')
-rw-r--r--src/fuchsia/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs
index f179923ac4..d3d9e45442 100644
--- a/src/fuchsia/mod.rs
+++ b/src/fuchsia/mod.rs
@@ -3256,12 +3256,12 @@ f! {
}
}
- pub fn CMSG_ALIGN(len: ::size_t) -> ::size_t {
+ pub {const} fn CMSG_ALIGN(len: ::size_t) -> ::size_t {
(len + ::mem::size_of::<::size_t>() - 1)
& !(::mem::size_of::<::size_t>() - 1)
}
- pub fn CMSG_SPACE(len: ::c_uint) -> ::c_uint {
+ pub {const} fn CMSG_SPACE(len: ::c_uint) -> ::c_uint {
(CMSG_ALIGN(len as ::size_t) + CMSG_ALIGN(::mem::size_of::<cmsghdr>()))
as ::c_uint
}