Skip to content

Fix macOS detection - #462

Merged
cameron314 merged 1 commit into
cameron314:masterfrom
pinotree:fix-apple-detection
Nov 28, 2026
Merged

cameron314 merged 1 commit into
cameron314:masterfrom
pinotree:fix-apple-detection

Conversation

@pinotree

Copy link
Copy Markdown
Contributor

Checking for __MACH__ is not enough, as that is defined for any OS that uses a (micro)kernel based on Mach (e.g. GNU/Hurd as well).

The proper way to check for macOS is using __APPLE__, so adapt the existing branches to check that too.

Checking for __MACH__ is not enough, as that is defined for any OS
that uses a (micro)kernel based on Mach (e.g. GNU/Hurd as well).

The proper way to check for macOS is using __APPLE__, so adapt the
existing branches to check that too.
@cameron314

Copy link
Copy Markdown
Owner

Does mach.h not expose the same semaphore API on non-Apple OSes?

@pinotree

Copy link
Copy Markdown
Contributor Author

Yes, it's basically a different API.

@cameron314 cameron314 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

@cameron314
cameron314 merged commit f8ea55c into cameron314:master Nov 28, 2026
1 of 2 checks passed
@pinotree
pinotree deleted the fix-apple-detection branch November 28, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants