waydabber / m1ddc

This little tool controls external displays (connected via USB-C/DisplayPort Alt Mode) using DDC/CI on Apple Silicon Macs. Useful to embed in various scripts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failing to make on M1 mac running Monterey

andrewgribben opened this issue · comments

clang -fmodules -o m1ddc m1ddc.m
m1ddc.m:84:63: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            io_registry_entry_t root = IORegistryGetRootEntry(kIOMasterPortDefault);
                                                              ^~~~~~~~~~~~~~~~~~~~
                                                              kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault

Hi @andrewgribben - despite the warning it should still complile. But you are right, this should be changed.

fixed. Thanks for noticing this!