Syllo / nvtop

GPU & Accelerator process monitoring for AMD, Apple, Huawei, Intel, NVIDIA and Qualcomm
Other
7.69k stars 281 forks source link

error: use of undeclared identifier 'kIOMainPortDefault' #284

Open ryandesign opened 3 months ago

ryandesign commented 3 months ago

nvtop 3.1.0 fails to build on macOS 11:

src/extract_gpuinfo_apple.m:92:66: error: use of undeclared identifier 'kIOMainPortDefault'
    const io_service_t gpu_service = IOServiceGetMatchingService(kIOMainPortDefault, IORegistryEntryIDMatching(registry_id));
                                                                 ^
1 error generated.

Indeed kIOMainPortDefault was introduced in macOS 12.

I couldn't find a statement of which macOS versions are supported so I don't know if this limitation is intentional.