[macOS] error: use of undeclared identifier 'kIOMainPortDefault'
jakirkham opened this issue · comments
jakirkham commented
Summary
- OS: macOS
- Architecture: x86_64 or aarch64
- Psutil version: 5.9.8 (did not happen in 5.9.7)
- Python version: 3.8-3.12
- Type: installation (build)
Description
On macOS pre-12.0 kIOMainPortDefault
is undefined. Instead it is called kIOMasterPortDefault
. As a result, when building on macOS pre-12.0 with the constant kIOMainPortDefault
(as seen below), an error is generated
Line 140 in 27a1432
Given that both of these constants are equal to NULL
, one approach would be to use NULL
instead
cc @snOm3ad (who may have authored this code and have thoughts on the approach here)
xref: #2222