$OpenBSD: patch-src_openbsd_up-backend_c,v 1.20 2016/05/04 11:11:55 jasper Exp $

Add missing #include after https://cgit.freedesktop.org/upower/commit/?id=77239cc4470fc515e1c8c6c21005fa08f3b1b04e

Remove pointless upperbound, SENSOR_MAX_TYPES has no meaning here and we
break from the loop anyway when needed.

--- src/openbsd/up-backend.c.orig	Wed Jul 29 14:47:49 2015
+++ src/openbsd/up-backend.c	Wed May  4 10:44:04 2016
@@ -24,6 +24,7 @@
 #include "up-backend.h"
 #include "up-daemon.h"
 #include "up-device.h"
+#include "up-backend-bsd-private.h"
 #include <string.h> /* strcmp() */
 
 static void	up_backend_class_init	(UpBackendClass	*klass);
@@ -461,7 +462,7 @@ up_backend_update_lid_status(UpDaemon *daemon) {
 	/* go through all acpibtn devices, and check if one of the values match "lid"
 	   if so, use that device.
 	*/
-	for (dev = 0; SENSOR_MAX_TYPES; dev++) {
+	for (dev = 0; ; dev++) {
 		mib[2] = dev;
 		if (sysctl(mib, 3, &sensordev, &sdlen, NULL, 0) == -1) {
 			if (errno == ENXIO)
