summaryrefslogtreecommitdiff
path: root/src/unix/bsd/netbsdlike
diff options
context:
space:
mode:
authorJohn Millikin <john@john-millikin.com>2023-05-08 15:02:16 +0900
committerJohn Millikin <john@john-millikin.com>2023-05-08 15:02:16 +0900
commitdbae373978629aea0c29b6a4ba62e4cb2e2d0d4e (patch)
tree7a80b35e6baa7d5e91bcd7f6e7d537a39a715947 /src/unix/bsd/netbsdlike
parent3b5109b3da613de31eb0d6bd42c9d6a6033360fb (diff)
downloadrust-libc-dbae373978629aea0c29b6a4ba62e4cb2e2d0d4e.tar.gz
Constify `CMSG_LEN` for all targets.
Diffstat (limited to 'src/unix/bsd/netbsdlike')
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs2
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 093b24fe95..de5ec3863e 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -2422,7 +2422,7 @@ f! {
.offset(_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 {
_ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length
}
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index ef66311268..3b87dc211f 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1705,7 +1705,7 @@ f! {
.offset(_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 {
_ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length
}