$OpenBSD: patch-drivers_usbhid-ups_c,v 1.4 2012/06/08 21:07:02 sthen Exp $
--- drivers/usbhid-ups.c.orig	Wed May 30 21:17:37 2012
+++ drivers/usbhid-ups.c	Fri Jun  8 01:38:28 2012
@@ -928,7 +928,7 @@ void upsdrv_initups(void)
 	   regular expression (USB) or device_path (SHUT) */
 	ret = comm_driver->open(&udev, &curDevice, subdriver_matcher, &callback);
 	if (ret < 1)
-		fatalx(EXIT_FAILURE, "No matching HID UPS found");
+		fatalx(EXIT_FAILURE, "No matching HID UPS found - check permissions on /dev/ugen* and /dev/usb*");
 
 	hd = &curDevice;
 
@@ -1248,7 +1248,9 @@ static bool_t hid_ups_walk(walkmode_t mode)
 
 		case -ETIMEDOUT:	/* Connection timed out */
 		case -EOVERFLOW:	/* Value too large for defined data type */
+#ifdef EPROTO
 		case -EPROTO:		/* Protocol error */
+#endif
 		case -EPIPE:		/* Broken pipe */
 		default:
 			/* Don't know what happened, try again later... */
