Skip to content

Replace deprecated kIOMasterPortDefault with MACH_PORT_NULL - #15

Open
n8felton wants to merge 1 commit into
AsahiLinux:mainfrom
n8felton:fix/kiomainportdefault
Open

Replace deprecated kIOMasterPortDefault with MACH_PORT_NULL#15
n8felton wants to merge 1 commit into
AsahiLinux:mainfrom
n8felton:fix/kiomainportdefault

Conversation

@n8felton

@n8felton n8felton commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

macOS 12 deprecated kIOMasterPortDefault in favor of kIOMainPortDefault, which causes two -Wdeprecated-declarations warnings at build time. Apple documents both names as synonyms for NULL, so pass MACH_PORT_NULL instead. This keeps the build clean on macOS 12 and later, and it needs no SDK version guard for older SDKs, where kIOMainPortDefault does not exist.

Fixes #8

macOS 12 deprecated kIOMasterPortDefault in favor of kIOMainPortDefault,
which causes two -Wdeprecated-declarations warnings at build time. Apple
documents both names as synonyms for NULL, so pass MACH_PORT_NULL
instead. This keeps the build clean on macOS 12 and later, and it needs
no SDK version guard for older SDKs, where kIOMainPortDefault does not
exist.

Fixes AsahiLinux#8

Signed-off-by: n8felton <n8felton@gmail.com>
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.

warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0

1 participant