$OpenBSD: patch-src_core_c,v 1.2 2011/09/11 18:53:28 dcoppa Exp $
--- src/core.c.orig	Tue Oct  5 23:29:36 2010
+++ src/core.c	Mon Jul 18 14:02:29 2011
@@ -75,6 +75,7 @@
 #include "freebsd.h"
 #elif defined(__OpenBSD__)
 #include "openbsd.h"
+int64_t *fresh;
 #endif
 
 #include <string.h>
@@ -170,10 +171,14 @@ struct text_object *construct_text_object(const char *
 #else
 			NORM_ERR("acpiacadapter: arg is only used on linux");
 #endif
-		}
+		} END
 #endif /* !__OpenBSD__ */
-	END OBJ(freq, 0)
+	OBJ(freq, 0)
 		get_cpu_count();
+#ifdef __OpenBSD__
+		free(fresh);
+		fresh = NULL;
+#endif
 		if (!arg || !isdigit(arg[0]) || strlen(arg) >= 2 || atoi(&arg[0]) == 0
 				|| atoi(&arg[0]) > info.cpu_count) {
 			obj->data.i = 1;
@@ -326,7 +331,7 @@ struct text_object *construct_text_object(const char *
 			obj->data.i = PB_BATT_STATUS;
 		}
 #endif /* __linux__ */
-#if (defined(__FreeBSD__) || defined(__linux__))
+#if (defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__linux__))
 	END OBJ_IF_ARG(if_up, 0, "if_up needs an argument")
 		parse_if_up_arg(obj, arg);
 #endif
@@ -541,8 +546,10 @@ struct text_object *construct_text_object(const char *
 		parse_platform_sensor(obj, arg);
 	END OBJ_ARG(hwmon, 0, "hwmon needs argumanets")
 		parse_hwmon_sensor(obj, arg);
+#endif
 	END OBJ(addr, &update_net_stats)
 		parse_net_stat_arg(obj, arg, free_at_crash);
+#ifdef __linux__
 	END OBJ(addrs, &update_net_stats)
 		parse_net_stat_arg(obj, arg, free_at_crash);
 #endif /* __linux__ */
@@ -860,7 +867,7 @@ struct text_object *construct_text_object(const char *
 	END OBJ(gw_ip, &update_gateway_info)
 #endif /* !__linux__ */
 #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
-		|| defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+		|| defined(__OpenBSD__))
 	END OBJ(apm_adapter, 0)
 	END OBJ(apm_battery_life, 0)
 	END OBJ(apm_battery_time, 0)
@@ -1516,7 +1523,7 @@ void free_text_objects(struct text_object *root, int i
 					free(data.s);
 				break;
 #endif
-#if (defined(__FreeBSD__) || defined(__linux__))
+#if (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__))
 			case OBJ_if_up:
 				free_if_up(obj);
 				break;
