diff --git a/src/detection/bootmgr/bootmgr_apple.c b/src/detection/bootmgr/bootmgr_apple.c index c7e1bde73..2e00f7f23 100644 --- a/src/detection/bootmgr/bootmgr_apple.c +++ b/src/detection/bootmgr/bootmgr_apple.c @@ -7,7 +7,7 @@ static const char* detectSecureBoot(bool* result) { #if __aarch64__ - FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(kIOMainPortDefault, "IODeviceTree:/chosen"); + FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(MACH_PORT_NULL, "IODeviceTree:/chosen"); if (!entryDevice) return "IORegistryEntryFromPath() failed"; @@ -20,7 +20,7 @@ static const char* detectSecureBoot(bool* result) *result = (bool) *CFDataGetBytePtr((CFDataRef) prop); #else - FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(kIOMainPortDefault, "IODeviceTree:/options"); + FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(MACH_PORT_NULL, "IODeviceTree:/options"); if (!entryDevice) return "IORegistryEntryFromPath() failed"; diff --git a/src/detection/physicalmemory/physicalmemory_apple.m b/src/detection/physicalmemory/physicalmemory_apple.m index 2812f7707..64b73d9b3 100644 --- a/src/detection/physicalmemory/physicalmemory_apple.m +++ b/src/detection/physicalmemory/physicalmemory_apple.m @@ -123,7 +123,7 @@ static const char* detectFromSystemProfiler(FFlist* result) FF_MAYBE_UNUSED static const char* detectFromIokit(FFlist* result) { - FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(kIOMainPortDefault, "IODeviceTree:/chosen"); + FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(MACH_PORT_NULL, "IODeviceTree:/chosen"); if (!entryDevice) return "IORegistryEntryFromPath() failed";