[Nut-upsuser] Building nut 2.6.0 on OpenBSD 4.8 - compile issue

Mike. the.lists at mgm51.com
Fri Jan 21 21:54:58 UTC 2011


On 1/21/2011 at 8:15 PM Arjen de Korte wrote:

|Citeren "Mike." <the.lists at mgm51.com>:
|
|> Trying to build nut 2.6.0 on OpenBSD 4.8, I get a compiler error.
|
|[...]
|
|> Making all in drivers
|> gmake[1]: Entering directory `/home/downloads/nut/nut-2.6.0/drivers'
|> gcc -DHAVE_CONFIG_H -I. -I../include    -I../include
-DSHUT_MODE
|> -g -O2 -Wall -Wsign-compare -MT newmge_shut-usbhid-ups.o -MD -MP -MF
|> .deps/newmge_shut-usbhid-ups.Tpo -c -o newmge_shut-usbhid-ups.o
`test
|> -f 'usbhid-ups.c' || echo './'`usbhid-ups.c
|> usbhid-ups.c: In function 'hid_ups_walk':
|> usbhid-ups.c:1231: error: 'EPROTO' undeclared (first use in this
|> function)
|> usbhid-ups.c:1231: error: (Each undeclared identifier is reported
only
|> once
|> usbhid-ups.c:1231: error: for each function it appears in.)
|> gmake[1]: *** [newmge_shut-usbhid-ups.o] Error 1
|> gmake[1]: Leaving directory `/home/downloads/nut/nut-2.6.0/drivers'
|> gmake: *** [all-recursive] Error 1
|
|In the usbhid-ups driver this line is a no-op, so I suggest to comment
 
|it out. Question remains why this happens. Either OpenBSD 4.8 is not  
|POSIX compliant or we're not including the right headers. Could you  
|run a grep on your /usr/include directory (or whatever it may be  
|called in OpenBSD) for EPROTO?
 =============


Thanks for the quick reply.

On OpenBSD 4.8, the errno.h file resides in /usr/include/sys  and
contains the various error number defines up to code 91, but no EPROTO.
 None of the other include files contained EPROTO (according to the
grep results).

I looked at the same file on my FreeBSD 8.1 box, and errno.h contains
the various error number defines up to code 92, which happens to be the
code for EPROTO.


According to the wikipedia entry, OpenBSD, FreeBSD and the various
Linux distributions are "mostly complaint" with POSIX.   I guess
"mostly complaint" means that certain, and differing, bits are not
present, depending upon the particular OS.  
( http://en.wikipedia.org/wiki/POSIX#Mostly_POSIX-compliant )


In any case, I commented out the line, as you sugggested and the
compile completed cleanly.

Thanks.





More information about the Nut-upsuser mailing list