[Nut-upsuser] Install problem & Geek Squad UPS

Gary Redden redden at skybest.com
Fri Jan 19 20:02:05 CET 2007


When I try to build newhidups I seem to be missing a file (usb.h) or 
should be setting a parameter SHUT_MODE. I did a search of my system and 
do not have the file usb.h. I also poked around on WebSvn but could not 
turn up the file. I think SHUT_MODE is for a different device than I 
have. Where do I find usb.h? Is this the correct list for this problem?
Error messages

gary at redden-p700:/home/nut/nut-2.0.5/drivers$ make newhidups
gcc -I../include -O -Wall -Wsign-compare -c newhidups.c
In file included from newhidups.c:25:
libhid.h:50:18: error: usb.h: No such file or directory
In file included from newhidups.c:25:
libhid.h:51: error: syntax error before ‘hid_dev_handle’
libhid.h:51: warning: type defaults to ‘int’ in declaration of 
‘hid_dev_handle’
libhid.h:51: warning: data definition has no type or storage class
libhid.h:178: error: syntax error before ‘*’ token
libhid.h:183: error: syntax error before ‘*’ token
libhid.h:184: error: syntax error before ‘*’ token
libhid.h:186: error: syntax error before ‘*’ token
libhid.h:188: error: syntax error before ‘*’ token
libhid.h:190: error: syntax error before ‘*’ token
libhid.h:201: error: syntax error before ‘*’ token
libhid.h:206: error: syntax error before ‘*’ token
libhid.h:211: error: syntax error before ‘*’ token
libhid.h:216: error: syntax error before ‘*’ token
libhid.h:227: error: syntax error before ‘*’ token
libhid.h:232: error: syntax error before ‘*’ token
libhid.h:237: error: syntax error before ‘*’ token
In file included from newhidups.c:26:
newhidups.h:39: error: syntax error before ‘*’ token
newhidups.h:39: warning: type defaults to ‘int’ in declaration of ‘udev’
newhidups.h:39: warning: data definition has no type or storage class
newhidups.c:69: error: syntax error before ‘*’ token
newhidups.c:69: warning: type defaults to ‘int’ in declaration of ‘udev’
newhidups.c:69: warning: data definition has no type or storage class
make: *** [newhidups.o] Error 1
gary at redden-p700:/home/nut/nut-2.0.5/drivers$

Code from libhid.h

#ifdef SHUT_MODE
struct shut_dev_handle_s {
int upsfd; /* point to main.c/upsfd */
char *device_path;
};
typedef struct shut_dev_handle_s shut_dev_handle;
typedef shut_dev_handle hid_dev_handle;
#else
#include <usb.h>
typedef usb_dev_handle hid_dev_handle;
#endif




More information about the Nut-upsuser mailing list