Fix fabro-beastie linker error by linking IOKit framework

The extern block declaring IOPMAssertionCreateWithName and
IOPMAssertionRelease was missing the #[link] attribute, causing
undefined symbol errors on macOS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-15 18:27:42 -04:00
parent 43f5fb0edb
commit 8b948a2d68
No known key found for this signature in database

View file

@ -10,6 +10,7 @@ pub const kIOPMAssertionIDInvalid: IOPMAssertionID = 0;
pub type IOReturn = i32;
pub const kIOReturnSuccess: IOReturn = 0;
#[link(name = "IOKit", kind = "framework")]
extern "C" {
pub fn IOPMAssertionCreateWithName(
assertion_type: core_foundation::string::CFStringRef,