You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main.cpp:102:56: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, matching);
^~~~~~~~~~~~~~~~~~~~
kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
^
main.cpp:130:38: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
if (IOServiceGetMatchingServices(kIOMasterPortDefault, matching, &iter) != kIOReturnSuccess)
^~~~~~~~~~~~~~~~~~~~
kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
^
Changing kIOMainPortDefault to just 0 should work. Hoping to test and submit PR, but documenting it for now.
The text was updated successfully, but these errors were encountered:
Switch kIOMasterPortDefault to kIOMainPortDefault but kIOMainPortDefault will only work with macOS 12+ unless we do something like libusb/hidapi#377 (comment)
When specifying a primary port to IOKit functions, the NULL argument indicates "use the default". This is a synonym for NULL, if you'd rather use a named constant.
kIOMasterPortDefault and kIOMainPortDefault are just synonyms for NULL, which is just 0 in C++. So, change kIOMasterPortDefault to 0 and not care about which version of macOS/Xcode we're compiling for/on.
Hi. With the objective to enter an iPad in DFU mode, I tried to compile the project and I encounter the same error about kIOMasterPortDefault. Is the modification suggested to replace the word "kIOMasterPortDefault" to "0" 2 times in the main.cpp file ?
Changing
kIOMainPortDefault
to just0
should work. Hoping to test and submit PR, but documenting it for now.The text was updated successfully, but these errors were encountered: