$OpenBSD: apm-patch-src_aapm_cc,v 1.2 2009/02/08 21:56:18 ajacoutot Exp $ --- src/aapm.cc.orig Tue Oct 24 12:38:18 2006 +++ src/aapm.cc Tue Oct 24 12:39:12 2006 @@ -34,7 +34,7 @@ #include #endif -#ifdef __NetBSD__ +#if defined __NetBSD__ || defined __OpenBSD__ #include #include #include @@ -65,7 +65,7 @@ static YColor *taskBarBg = 0; void ApmStr(char *s, bool Tool) { #ifdef __FreeBSD__ struct apm_info ai; -#elif defined __NetBSD__ +#elif defined __NetBSD__ || defined __OpenBSD__ struct apm_power_info ai; #else char buf[80]; @@ -106,7 +106,7 @@ void ApmStr(char *s, bool Tool) { BATlife = ai.ai_batt_life; BATtime = ai.ai_batt_time == 0 ? -1 : ai.ai_batt_time; strcpy(units, "sec"); -#elif defined __NetBSD__ +#elif defined __NetBSD__ || defined __OpenBSD__ memset(&ai, 0, sizeof(ai)); if (ioctl(fd, APM_IOC_GETPOWER, &ai) == -1) {