libc icon indicating copy to clipboard operation
libc copied to clipboard

linux: Use the input_event_X macros to access input_event members

Open snogge opened this issue 7 months ago • 5 comments

Description

Use the input_event_sec and input_event_usec members (macros in C) on all platforms, no matter whether time_t is 32 or 64 bits. This means the same members are available in the struct no matter whether it is a 32 or 64 bit platform or the linux_time_bits64 config is set.

This is a breaking change.

Sources

https://github.com/torvalds/linux/blob/0cc53520e68bea7fb80fdc6bdf8d226d1b6a98d9/include/uapi/linux/input.h#L28

Checklist

  • [x] Relevant tests in libc-test/semver have been updated
  • [x] No placeholder or unstable values like *LAST or *MAX are included (see #3131)
  • [x] Tested locally (cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI

This is a breaking change and should not be backported to the 0.2 branch.

snogge avatar Aug 14 '25 12:08 snogge

Reminder, once the PR becomes ready for a review, use @rustbot ready.

rustbot avatar Dec 03 '25 08:12 rustbot

I've seen your comments and hope to get around to this next week.

snogge avatar Dec 04 '25 12:12 snogge

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

rustbot avatar Dec 15 '25 14:12 rustbot

@rustbot ready

@tgross35 The change causes CI errors for i686-linux-unknown-musl. I was not sure what the right thing to do was - I have not been keeping up to date on changes - so I added another time64 exception for musl.

snogge avatar Dec 15 '25 14:12 snogge

The musl time64 changes caused a conflict here so this will need a rebase (sorry about that)

@tgross35 The change causes CI errors for i686-linux-unknown-musl. I was not sure what the right thing to do was - I have not been keeping up to date on changes - so I added another time64 exception for musl.

I think it should be fixed by https://github.com/rust-lang/libc/pull/4463 which resolved everything else in that block (hence the conflict), musl on relevant platforms should be setting the linux time64 cfg now.

tgross35 avatar Dec 18 '25 08:12 tgross35

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

rustbot avatar Jan 14 '26 08:01 rustbot

Rebase is done, I think the failing check is unrelated.

@rustbot ready

snogge avatar Jan 14 '26 08:01 snogge

Thank you!

Since this is breaking, @rustbot label +stable-declined

tgross35 avatar Jan 16 '26 01:01 tgross35