From 9e5c2e9ac331f9a21c976f1da05c271c20843567 Mon Sep 17 00:00:00 2001 From: octo Date: Fri, 21 Apr 2006 06:46:49 +0000 Subject: [PATCH] Only include `dict_get_double' when using IOKit or CoreFoundation. This caused a build on Linux to fail before.. --- src/battery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/battery.c b/src/battery.c index 10e8c00d..2141a58c 100644 --- a/src/battery.c +++ b/src/battery.c @@ -202,6 +202,7 @@ static void battery_submit (char *inst, double current, double voltage, double c } } +#if HAVE_IOKIT_PS_IOPOWERSOURCES_H || HAVE_IOKIT_IOKITLIB_H double dict_get_double (CFDictionaryRef dict, char *key_string) { double val_double; @@ -249,6 +250,7 @@ double dict_get_double (CFDictionaryRef dict, char *key_string) return (val_double); } +#endif /* HAVE_IOKIT_PS_IOPOWERSOURCES_H || HAVE_IOKIT_IOKITLIB_H */ #if HAVE_IOKIT_PS_IOPOWERSOURCES_H static void get_via_io_power_sources (double *ret_charge, -- 2.30.2