Browse Source

powersupplyclass_darwin: enable builds against older macOS SDK

This is necessary to build on darwin using nix, as nix-darwin uses an
older macOS SDK, built from Apple's open source releases.

Signed-off-by: Peter Woodman <peter@shortbus.org>
pull/2327/head
Peter Woodman 3 years ago
parent
commit
2370cccc1f
No known key found for this signature in database
GPG Key ID: E2BEB7BAA835F758
  1. 4
      collector/powersupplyclass_darwin.go

4
collector/powersupplyclass_darwin.go

@ -18,9 +18,11 @@ package collector
/* /*
#cgo LDFLAGS: -framework IOKit -framework CoreFoundation #cgo LDFLAGS: -framework IOKit -framework CoreFoundation
#include <CoreFoundation/CFNumber.h>
#include <CoreFoundation/CFRunLoop.h>
#include <CoreFoundation/CFString.h>
#include <IOKit/ps/IOPowerSources.h> #include <IOKit/ps/IOPowerSources.h>
#include <IOKit/ps/IOPSKeys.h> #include <IOKit/ps/IOPSKeys.h>
#include <CoreFoundation/CFArray.h>
// values collected from IOKit Power Source APIs // values collected from IOKit Power Source APIs
// Functions documentation available at // Functions documentation available at

Loading…
Cancel
Save