Skip to content

uucore, uptime: various deprecation warnings with musl #7865

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

Open
cakebaker opened this issue May 1, 2025 · 2 comments
Open

uucore, uptime: various deprecation warnings with musl #7865

cakebaker opened this issue May 1, 2025 · 2 comments

Comments

@cakebaker
Copy link
Contributor

In the CI, various deprecation warnings show up in musl-related jobs (I omitted duplicate warnings):

warning: use of deprecated type alias `libc::time_t`: This type is changed to 64-bit in musl 1.2.0, we'll follow that change in the future release. See #1848 for more info.
  --> src/uucore/src/lib/features/uptime.rs:17:11
   |
17 | use libc::time_t;
   |           ^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated function `libc::endutxent`: musl provides `utmp` as stubs and an alternative should be preferred; see https://wiki.musl-libc.org/faq.html
  --> src/uucore/src/lib/features/utmpx.rs:43:15
   |
43 | pub use libc::endutxent;
   |               ^^^^^^^^^

warning: use of deprecated function `libc::getutxent`: musl provides `utmp` as stubs and an alternative should be preferred; see https://wiki.musl-libc.org/faq.html
  --> src/uucore/src/lib/features/utmpx.rs:44:15
   |
44 | pub use libc::getutxent;
   |               ^^^^^^^^^

warning: use of deprecated function `libc::setutxent`: musl provides `utmp` as stubs and an alternative should be preferred; see https://wiki.musl-libc.org/faq.html
  --> src/uucore/src/lib/features/utmpx.rs:45:15
   |
45 | pub use libc::setutxent;
   |               ^^^^^^^^^

warning: use of deprecated function `libc::utmpxname`: musl provides `utmp` as stubs and an alternative should be preferred; see https://wiki.musl-libc.org/faq.html
  --> src/uucore/src/lib/features/utmpx.rs:48:15
   |
48 | pub use libc::utmpxname;
   |               ^^^^^^^^^
@sylvestre
Copy link
Contributor

@Ecordonnier FYI in case you would like to fix them

@Ecordonnier
Copy link
Contributor

Ecordonnier commented May 1, 2025

I would say this is expected behavior. I added those warnings in the libc create to warn that those functions are only stubs (see also . #7740 (comment) ). However calling those stubs from uutils-coreutils makes sense in order to have identical behavior with GNU coreutils and avoid special logic for musl libc. What would you like to change?

I can silence the warnings if you want (on the other side I think those warnings are useful for developers working with musl). There is no alternative function that musl offers which can be used.

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

No branches or pull requests

3 participants