patch-src_conky_c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. $OpenBSD: patch-src_conky_c,v 1.6 2012/12/31 09:36:38 chrisz Exp $
  2. --- src/conky.c.orig Thu May 3 23:22:21 2012
  3. +++ src/conky.c Tue Jul 24 18:10:39 2012
  4. @@ -125,7 +125,7 @@
  5. /* FIXME: apm_getinfo is unused here. maybe it's meant for common.c */
  6. #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
  7. - || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
  8. + || defined(__OpenBSD__))
  9. int apm_getinfo(int fd, apm_info_t aip);
  10. char *get_apm_adapter(void);
  11. char *get_apm_battery_life(void);
  12. @@ -401,10 +401,6 @@ static int maximum_width;
  13. #endif /* X11 */
  14. -#ifdef __OpenBSD__
  15. -static int sensor_device;
  16. -#endif
  17. -
  18. long color0, color1, color2, color3, color4, color5, color6, color7, color8,
  19. color9;
  20. @@ -1015,7 +1011,7 @@ void generate_text_internal(char *p, int p_max_size,
  21. get_powerbook_batt_info(p, p_max_size, obj->data.i);
  22. }
  23. #endif /* __linux__ */
  24. -#if (defined(__FreeBSD__) || defined(__linux__))
  25. +#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__))
  26. OBJ(if_up) {
  27. if (!interface_up(obj)) {
  28. DO_JUMP;
  29. @@ -1899,7 +1895,7 @@ void generate_text_internal(char *p, int p_max_size,
  30. }
  31. #endif /* __linux__ */
  32. #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
  33. - || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
  34. + || defined(__OpenBSD__))
  35. OBJ(apm_adapter) {
  36. char *msg;
  37. @@ -3496,12 +3492,14 @@ static void main_loop(void)
  38. if(update_interval_bat != NOBATTERY && update_interval_bat != update_interval_old) {
  39. char buf[max_user_text];
  40. +#ifndef __OpenBSD__
  41. get_battery_short_status(buf, max_user_text, "BAT0");
  42. if(buf[0] == 'D') {
  43. update_interval = update_interval_bat;
  44. } else {
  45. update_interval = update_interval_old;
  46. }
  47. +#endif
  48. }
  49. info.looped++;