If we don't have a timeout, or if we can convert the timeout to a `__kernel_old_timespec`, the use `__NR_ppoll`.
(timeout: &Timespec)
| 34 | // If we don't have a timeout, or if we can convert the timeout to |
| 35 | // a `__kernel_old_timespec`, the use `__NR_ppoll`. |
| 36 | fn convert(timeout: &Timespec) -> Option<__kernel_old_timespec> { |
| 37 | Some(__kernel_old_timespec { |
| 38 | tv_sec: timeout.tv_sec.try_into().ok()?, |
| 39 | tv_nsec: timeout.tv_nsec.try_into().ok()?, |
| 40 | }) |
| 41 | } |
| 42 | let old_timeout = if let Some(timeout) = timeout { |
| 43 | match convert(timeout) { |
| 44 | // Could not convert timeout. |