openbsd-ports/sysutils/conky/patches/patch-src_conky_c
chrisz a87833e6a9 update to conky-1.9.0
OK jasper@, benoit@ (maintainer)
2012-12-31 09:36:38 +00:00

57 lines
1.8 KiB
Plaintext

$OpenBSD: patch-src_conky_c,v 1.6 2012/12/31 09:36:38 chrisz Exp $
--- src/conky.c.orig Thu May 3 23:22:21 2012
+++ src/conky.c Tue Jul 24 18:10:39 2012
@@ -125,7 +125,7 @@
/* FIXME: apm_getinfo is unused here. maybe it's meant for common.c */
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
- || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+ || defined(__OpenBSD__))
int apm_getinfo(int fd, apm_info_t aip);
char *get_apm_adapter(void);
char *get_apm_battery_life(void);
@@ -401,10 +401,6 @@ static int maximum_width;
#endif /* X11 */
-#ifdef __OpenBSD__
-static int sensor_device;
-#endif
-
long color0, color1, color2, color3, color4, color5, color6, color7, color8,
color9;
@@ -1015,7 +1011,7 @@ void generate_text_internal(char *p, int p_max_size,
get_powerbook_batt_info(p, p_max_size, obj->data.i);
}
#endif /* __linux__ */
-#if (defined(__FreeBSD__) || defined(__linux__))
+#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__))
OBJ(if_up) {
if (!interface_up(obj)) {
DO_JUMP;
@@ -1899,7 +1895,7 @@ void generate_text_internal(char *p, int p_max_size,
}
#endif /* __linux__ */
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
- || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+ || defined(__OpenBSD__))
OBJ(apm_adapter) {
char *msg;
@@ -3496,12 +3492,14 @@ static void main_loop(void)
if(update_interval_bat != NOBATTERY && update_interval_bat != update_interval_old) {
char buf[max_user_text];
+#ifndef __OpenBSD__
get_battery_short_status(buf, max_user_text, "BAT0");
if(buf[0] == 'D') {
update_interval = update_interval_bat;
} else {
update_interval = update_interval_old;
}
+#endif
}
info.looped++;