Skip to content

hurd: Fix build from missing fpos_t #4472

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 1 commit into from
Jun 2, 2025
Merged

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jun 2, 2025

In 872642a ("gnu: Add proper structs for fpos_t and fpos64_t"), fpos_t was changed from an opaque struct to one with a definition on Linux GNU, with the Unix fallback configured as for targets without a GNU target_env. However, GNU hurd matches target_env = "gnu", but doesn't have a fpos implementation.

Fix the build by adjusting the fallback cfg to be more specific. Eventually we probably want the same definition on Hurd as on Linux.

In 872642a ("gnu: Add proper structs for fpos_t and fpos64_t"),
`fpos_t` was changed from an opaque struct to one with a definition on
Linux GNU, with the Unix fallback configured as for targets without a
GNU `target_env`. However, GNU hurd matches `target_env = "gnu"`, but
doesn't have a `fpos` implementation.

Fix the build by adjusting the fallback `cfg` to be more specific.
Eventually we probably want the same definition on Hurd as on Linux.
@tgross35 tgross35 added stable-nominated This PR should be considered for cherry-pick to libc's stable release branch and removed S-waiting-on-review O-unix labels Jun 2, 2025
@tgross35 tgross35 enabled auto-merge June 2, 2025 05:47
@tgross35 tgross35 added this pull request to the merge queue Jun 2, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jun 2, 2025
hurd: Fix build from missing `fpos_t`
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 2, 2025
@tgross35 tgross35 added this pull request to the merge queue Jun 2, 2025
Merged via the queue into rust-lang:main with commit 6955f6d Jun 2, 2025
101 of 148 checks passed
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Jun 3, 2025
In 872642a ("gnu: Add proper structs for fpos_t and fpos64_t"),
`fpos_t` was changed from an opaque struct to one with a definition on
Linux GNU, with the Unix fallback configured as for targets without a
GNU `target_env`. However, GNU hurd matches `target_env = "gnu"`, but
doesn't have a `fpos` implementation.

Fix the build by adjusting the fallback `cfg` to be more specific.
Eventually we probably want the same definition on Hurd as on Linux.

(backport <rust-lang#4472>)
(cherry picked from commit 72f49c9)
@tgross35 tgross35 mentioned this pull request Jun 3, 2025
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Jun 3, 2025
In 872642a ("gnu: Add proper structs for fpos_t and fpos64_t"),
`fpos_t` was changed from an opaque struct to one with a definition on
Linux GNU, with the Unix fallback configured as for targets without a
GNU `target_env`. However, GNU hurd matches `target_env = "gnu"`, but
doesn't have a `fpos` implementation.

Fix the build by adjusting the fallback `cfg` to be more specific.
Eventually we probably want the same definition on Hurd as on Linux.

(backport <rust-lang#4472>)
(cherry picked from commit 72f49c9)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants