Skip to content

refactor: deprecate lfs64 bindings in linux musl#5170

Open
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:musl-off_t-deprecation
Open

refactor: deprecate lfs64 bindings in linux musl#5170
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:musl-off_t-deprecation

Conversation

@dybucc

@dybucc dybucc commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

This PR removes support for the exposed LFS64 bindings under Linux musl. This follows from the libc crate's attempts at providing a single, unsuffixed type with which to provide 64-bit functionality.

This follows from #5032, where I understood libc was meant to provide a single, unsuffixed type and not necessarily support aliases (much less conditional aliases.) Upstream musl also defines the LFS64 types routines in terms of the unsuffixed types and routines.

This patch ensures we deprecate these types and the whole musl/lfs64 module in favor of using only the unsuffixed types and routines.

Sources

No specific sources are provided. Running the following command with rg in the main worktree of latest musl should yield search results that show the uniform aliasing mentioned above across all header files.

rg -C 15 -s -uu -g "**/*.h" -e "\\b_LARGEFILE64_SOURCE\\b"

Checklist

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

These types are defined upstream in terms of their unsuffixed types, and
a large part of the surface API in the exposed bindings does the same.

The `libc` crate is moving towards providing unsuffixed types and
routines that avoid the need for aliases. This intent was expressed on
Windows platforms in rust-lang#5032.

This patch altogether deprecates all items under Linux musl that are
conditionally exposed upstream under the `_LARGEFILE64_SOURCE` feature
test macro.
@dybucc dybucc force-pushed the musl-off_t-deprecation branch from 911a9e2 to 348a55e Compare June 15, 2026 13:57
@rustbot

rustbot commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants