Skip to content

Conversation

@gautam899
Copy link
Contributor

@gautam899 gautam899 commented Oct 26, 2025

Description

Adding functions and defines required for vxworks. This supersedes #4676 .
In this PR we have guarded the struct stat, and sigaction in such a way that it works for older (< 25.09) as well as newer versions of vxworks.

Authors

Sources

VxWorks sources are copyrighted.

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

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a handful of mechanical things here. Cc other target maintainer @biabbas

@tgross35
Copy link
Contributor

@rustbot author

@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2025

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

@rustbot

This comment has been minimized.

@gautam899
Copy link
Contributor Author

@rustbot ready

@rustbot

This comment has been minimized.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Could you please squash?

@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2025

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.

@gautam899
Copy link
Contributor Author

gautam899 commented Oct 29, 2025

@tgross35. CI test fails seems unrelated.

@tgross35 tgross35 enabled auto-merge October 29, 2025 08:30
@tgross35 tgross35 added this pull request to the merge queue Oct 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 29, 2025
@tgross35 tgross35 added this pull request to the merge queue Oct 29, 2025
Merged via the queue into rust-lang:main with commit 5a1ced6 Oct 29, 2025
60 of 73 checks passed
Comment on lines +2138 to +2139
// unistd.h
pub fn setpgid(pid: pid_t, pgid: pid_t) -> pid_t;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does vxworks actually deviate from posix here on the return type? https://pubs.opengroup.org/onlinepubs/009604599/functions/setpgid.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pid_t is an alias for c_int.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no ABI-level difference, but do the headers actually call for a pid_t return? Seems unusual.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that setpgid (in VxWorks) does infact return "pid_t". It seems vxworks here deviates from posix.

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Nov 3, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 4, 2025
Co-authored-by: Immad Mir <[email protected]>

(backport <rust-lang#4781>)
(cherry picked from commit 2bee2f3)
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Nov 4, 2025
@tgross35 tgross35 mentioned this pull request Nov 4, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2025
Co-authored-by: Immad Mir <[email protected]>

(backport <#4781>)
(cherry picked from commit 2bee2f3)
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2025
@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 Nov 4, 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.

5 participants