Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build of timerfd-1.5.0 fails: unresolved imports rustix::time::Itimerspec, rustix::time::TimerfdClockId #16

Open
yurivict opened this issue Dec 25, 2023 · 2 comments

Comments

@yurivict
Copy link

yurivict commented Dec 25, 2023

error[E0432]: unresolved imports `rustix::time::Itimerspec`, `rustix::time::TimerfdClockId`
  --> /usr/ports/emulators/firecracker/work/firecracker-1.6.0/cargo-crates/timerfd-1.5.0/src/lib.rs:51:20
   |
51 | use rustix::time::{Itimerspec, TimerfdClockId};
   |                    ^^^^^^^^^^  ^^^^^^^^^^^^^^ no `TimerfdClockId` in `time`
   |                    |
   |                    no `Itimerspec` in `time`
   |                    help: a similar name exists in the module: `Timespec`

error[E0432]: unresolved imports `rustix::time::TimerfdFlags`, `rustix::time::TimerfdTimerFlags`
   --> /usr/ports/emulators/firecracker/work/firecracker-1.6.0/cargo-crates/timerfd-1.5.0/src/lib.rs:128:20
    |
128 | use rustix::time::{TimerfdFlags, TimerfdTimerFlags};
    |                    ^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^ no `TimerfdTimerFlags` in `time`
    |                    |
    |                    no `TimerfdFlags` in `time`

error[E0432]: unresolved import `rustix::time::Itimerspec`
 --> /usr/ports/emulators/firecracker/work/firecracker-1.6.0/cargo-crates/timerfd-1.5.0/src/structs.rs:3:20
  |
3 | use rustix::time::{Itimerspec, Timespec};
  |                    ^^^^^^^^^^
  |                    |
  |                    no `Itimerspec` in `time`
  |                    help: a similar name exists in the module: `Timespec`
  |
  = help: consider importing this unresolved item through its public re-export instead:
          Itimerspec

error[E0425]: cannot find function `timerfd_create` in module `rustix::time`
   --> /usr/ports/emulators/firecracker/work/firecracker-1.6.0/cargo-crates/timerfd-1.5.0/src/lib.rs:187:32
    |
187 |         let fd = rustix::time::timerfd_create(clock, flags)?;
    |                                ^^^^^^^^^^^^^^ not found in `rustix::time`

error[E0425]: cannot find function `timerfd_settime` in module `rustix::time`
   --> /usr/ports/emulators/firecracker/work/firecracker-1.6.0/cargo-crates/timerfd-1.5.0/src/lib.rs:208:33
    |
208 |         let old = rustix::time::timerfd_settime(&self.0, flags, &new)
    |                                 ^^^^^^^^^^^^^^^ not found in `rustix::time`

error[E0425]: cannot find function `timerfd_gettime` in module `rustix::time`
   --> /usr/ports/emulators/firecracker/work/firecracker-1.6.0/cargo-crates/timerfd-1.5.0/src/lib.rs:215:35
    |
215 |         let state = rustix::time::timerfd_gettime(&self.0)
    |                                   ^^^^^^^^^^^^^^^ not found in `rustix::time`

rustix-0.37.27
rustix-0.38.28

rust-1.74.1
FreeBSD 14.0 STABLE

@notgull
Copy link
Contributor

notgull commented Dec 25, 2023

cc @sunfishcode

@sunfishcode
Copy link
Contributor

It appears FreeBSD implemented Linux's timerfd feature. And it appears Rust libc crate has some of the bindings, and I've now submitted rust-lang/libc#3506 to add the rest. I've also started bytecodealliance/rustix#978 to add the rustix support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants