From 34ea43b7ca0cd55b4e1c29186c76888b83b5bd2f Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 14 Jul 2026 14:55:18 +0200 Subject: [PATCH] Remove workaround for miri not supporting poll Miri gained support for poll a couple of days ago. --- src/pam/rpassword.rs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/pam/rpassword.rs b/src/pam/rpassword.rs index ec335bfc0..1d976c86e 100644 --- a/src/pam/rpassword.rs +++ b/src/pam/rpassword.rs @@ -339,20 +339,14 @@ impl TimeoutRead<'_> { None => -1, }; - if cfg!(miri) { - // Miri doesn't support poll: rust-lang/miri#4413 - // FIXME(#1500) remove once miri supports it - pollfd[0].revents = libc::POLLIN; - } else { - // SAFETY: pollfd is initialized and its length matches - cerr(unsafe { - libc::poll( - pollfd.as_mut_ptr(), - pollfd.len().try_into().unwrap(), - timeout, - ) - })?; - } + // SAFETY: pollfd is initialized and its length matches + cerr(unsafe { + libc::poll( + pollfd.as_mut_ptr(), + pollfd.len().try_into().unwrap(), + timeout, + ) + })?; // There may yet be data waiting to be read even if POLLHUP is set. if pollfd[0].revents & (pollmask | libc::POLLHUP) > 0 {