Skip to content
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

Incorrect pthread_t definition on Darwin (should be a raw pointer, not an uintptr_t) #4336

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

highjeans
Copy link

Description

This PR Fixes #2903, however I am not sure if the change to build.rs is the right way to do it. MacOS has the _opaque_pthread_t type, however in build.rs it gets classified as a type rather than a struct, resulting in the test case for it using _opaque_pthread_t rather than struct _opaque_pthread_t. Please let me know if there is a better way to test _opaque_pthread_t without having to modify the build.rs file.

Sources

https://github.com/apple-oss-distributions/xnu/blob/8d741a5de7ff4191bf97d57b9f54c2f6d4a15585/EXTERNAL_HEADERS/sys/_pthread/_pthread_types.h#L103
https://github.com/apple-oss-distributions/libpthread/blob/main/include/sys/_pthread/_pthread_t.h#L31

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

@rustbot
Copy link
Collaborator

rustbot commented Mar 17, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

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.

Incorrect pthread_t definition on Darwin (should be a raw pointer, not an uintptr_t)
3 participants