Code

Only include `dict_get_double' when using IOKit or CoreFoundation. This caused a...
authorocto <octo>
Fri, 21 Apr 2006 06:46:49 +0000 (06:46 +0000)
committerocto <octo>
Fri, 21 Apr 2006 06:46:49 +0000 (06:46 +0000)
src/battery.c

index 10e8c00dbaa80e0abed863668dc596ae9f202b3f..2141a58c725f3515963f71e29566ac0315b0fca8 100644 (file)
@@ -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,