mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
macOS: uses MACH_PORT_NULL to maintain compatibility with older SDKs
Fixes #2140
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user