summaryrefslogtreecommitdiff
path: root/src/unix/bsd/freebsdlike/dragonfly/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-08 09:42:15 +0000
committerbors <bors@rust-lang.org>2023-05-08 09:42:15 +0000
commit71420d46c26890b7ad6bcc01baa08d0f6d82fde3 (patch)
tree7a80b35e6baa7d5e91bcd7f6e7d537a39a715947 /src/unix/bsd/freebsdlike/dragonfly/mod.rs
parent3b5109b3da613de31eb0d6bd42c9d6a6033360fb (diff)
parentdbae373978629aea0c29b6a4ba62e4cb2e2d0d4e (diff)
downloadrust-libc-71420d46c26890b7ad6bcc01baa08d0f6d82fde3.tar.gz
Auto merge of #3241 - jmillikin:cmsg-macros-const-usize, r=JohnTitor
Constify `CMSG_LEN` for all targets.
Diffstat (limited to 'src/unix/bsd/freebsdlike/dragonfly/mod.rs')
-rw-r--r--src/unix/bsd/freebsdlike/dragonfly/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index d323a43540..7d01e3e0d0 100644
--- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -1534,7 +1534,7 @@ f! {
.offset(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize)
}
- pub fn CMSG_LEN(length: ::c_uint) -> ::c_uint {
+ pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint {
(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + length as usize)
as ::c_uint
}