Skip to content

ProcessCreateTime doesn't work on 32-bit systems #1074

Closed
@jbicha

Description

@jbicha

Describe the bug

The new ProcessCreateTime function isn't working on 32-bit systems (Debian's i386, armel, armhf and Ubuntu's armhf).

Environment (please complete the following information):

  • Linux distribution: Debian Unstable or Ubuntu 25.04
  • sudo-rs commit hash: 0.2.5

Additional context

error[E0308]: arguments to this function are incorrect
   --> src/system/time.rs:165:12
    |
165 |         Ok(ProcessCreateTime::new(spec.tv_sec, spec.tv_nsec))
    |            ^^^^^^^^^^^^^^^^^^^^^^ -----------  ------------ expected `i64`, found `i32`
    |                                   |
    |                                   expected `i64`, found `i32`
    |
note: associated function defined here
   --> src/system/time.rs:141:12
    |
141 |     pub fn new(secs: i64, nsecs: i64) -> ProcessCreateTime {
    |            ^^^ ---------  ----------
help: you can convert an `i32` to an `i64`
    |
165 |         Ok(ProcessCreateTime::new(spec.tv_sec.into(), spec.tv_nsec))
    |                                              +++++++
help: you can convert an `i32` to an `i64`
    |
165 |         Ok(ProcessCreateTime::new(spec.tv_sec, spec.tv_nsec.into()))
    |                                                            +++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `sudo-rs` (lib test) due to 1 previous error

Originally reported at https://bugs.debian.org/1103275

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions