From: octo Date: Fri, 21 Apr 2006 06:46:49 +0000 (+0000) Subject: Only include `dict_get_double' when using IOKit or CoreFoundation. This caused a... X-Git-Tag: svn-trunk~65 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9e5c2e9ac331f9a21c976f1da05c271c20843567;p=collectd.git Only include `dict_get_double' when using IOKit or CoreFoundation. This caused a build on Linux to fail before.. --- 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,