Skip to content

Commit 28b7a96

Browse files
P_PIDFD is supported on linux
1 parent 9c0bdac commit 28b7a96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sys/wait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ pub enum Id<'fd> {
340340
/// If the PID is zero, the caller's process group is used since Linux 5.4.
341341
PGid(Pid),
342342
/// Wait for the child referred to by the given PID file descriptor
343-
#[cfg(linux_android)]
343+
#[cfg(any(linux_android, target_os = "linux"))]
344344
PIDFd(BorrowedFd<'fd>),
345345
/// A helper variant to resolve the unused parameter (`'fd`) problem on platforms
346346
/// other than Linux and Android.
@@ -362,7 +362,7 @@ pub fn waitid(id: Id, flags: WaitPidFlag) -> Result<WaitStatus> {
362362
Id::All => (libc::P_ALL, 0),
363363
Id::Pid(pid) => (libc::P_PID, pid.as_raw() as libc::id_t),
364364
Id::PGid(pid) => (libc::P_PGID, pid.as_raw() as libc::id_t),
365-
#[cfg(linux_android)]
365+
#[cfg(any(linux_android, target_os = "linux"))]
366366
Id::PIDFd(fd) => (libc::P_PIDFD, fd.as_raw_fd() as libc::id_t),
367367
Id::_Unreachable(_) => {
368368
unreachable!("This variant could never be constructed")

0 commit comments

Comments
 (0)