Skip to content

utmpx.rs: use correct constant names for musl libc #7459

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

Merged
merged 2 commits into from
Mar 16, 2025

Conversation

Ecordonnier
Copy link
Contributor

Unfortunately, the names of those constants are not standardized:

  • glibc uses __UT_HOSTSIZE, __UT_LINESIZE, __UT_NAMESIZE
  • musl uses UT_HOSTSIZE, UT_LINESIZE, UT_NAMESIZE

See:

  1. https://git.musl-libc.org/cgit/musl/tree/include/utmpx.h
  2. https://github.com/bminor/glibc/blob/master/sysdeps/gnu/bits/utmpx.h#L35

This is a partial fix for #1361

Unfortunately, the name of those constants are not standardized:
glibc uses __UT_HOSTSIZE, __UT_LINESIZE, __UT_NAMESIZE
musl uses UT_HOSTSIZE, UT_LINESIZE, UT_NAMESIZE

See:
1. https://git.musl-libc.org/cgit/musl/tree/include/utmpx.h
2. https://github.com/bminor/glibc/blob/master/sysdeps/gnu/bits/utmpx.h#L35

This is a partial fix for uutils#1361

Signed-off-by: Etienne Cordonnier <[email protected]>
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/misc/tee is no longer failing!

@sylvestre sylvestre merged commit 87ec828 into uutils:main Mar 16, 2025
67 checks passed
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

Successfully merging this pull request may close these issues.

2 participants