diff options
Diffstat (limited to 'vendor/rustix/src/thread/setns.rs')
-rw-r--r-- | vendor/rustix/src/thread/setns.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/rustix/src/thread/setns.rs b/vendor/rustix/src/thread/setns.rs index 2dd522a14..4568912b2 100644 --- a/vendor/rustix/src/thread/setns.rs +++ b/vendor/rustix/src/thread/setns.rs @@ -30,6 +30,9 @@ bitflags! { const PROCESS_ID = CLONE_NEWPID; /// Network name space. const NETWORK = CLONE_NEWNET; + + /// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags> + const _ = !0; } } @@ -82,6 +85,9 @@ bitflags! { const NEWUTS = CLONE_NEWUTS; /// `CLONE_SYSVSEM`. const SYSVSEM = CLONE_SYSVSEM; + + /// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags> + const _ = !0; } } @@ -96,7 +102,7 @@ bitflags! { /// /// [Linux]: https://man7.org/linux/man-pages/man2/setns.2.html pub fn move_into_link_name_space( - fd: BorrowedFd, + fd: BorrowedFd<'_>, allowed_type: Option<LinkNameSpaceType>, ) -> io::Result<()> { let allowed_type = allowed_type.map_or(0, |t| t as c_int); @@ -113,7 +119,7 @@ pub fn move_into_link_name_space( /// /// [Linux]: https://man7.org/linux/man-pages/man2/setns.2.html pub fn move_into_thread_name_spaces( - fd: BorrowedFd, + fd: BorrowedFd<'_>, allowed_types: ThreadNameSpaceType, ) -> io::Result<()> { syscalls::setns(fd, allowed_types.bits() as c_int).map(|_r| ()) |