xcode 14 removes the kIOMasterPortDefault symbol. As the documentation notes, this symbol (and kIOMainPortDefault) are both equal to NULL/0, so fall back to 0 when the kIOMainPortDefault symbol is not available (i.e. targeting macOS 11 and earlier/iOS 14 and earlier).
xcode 14 removes the kIOMasterPortDefault symbol. As the documentation notes, this symbol (and kIOMainPortDefault) are both equal to NULL/0, so fall back to 0 when the kIOMainPortDefault symbol is not available (i.e. targeting macOS 11 and earlier/iOS 14 and earlier).