X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/blobdiff_plain/a2a952c0da4b337ffcb3d26ba473761c48a6eb65..45e87cbfdccac0d61e8d3c888514cb475db6681f:/usb-driver.c diff --git a/usb-driver.c b/usb-driver.c index 27a9580..def52db 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include "usb-driver.h" #include "config.h" @@ -47,9 +49,9 @@ static int windrvrfd = -1; static unsigned long ppbase = 0; static unsigned long ecpbase = 0; static struct parport_config *pport = NULL; -FILE *modulesfp = NULL; -FILE *baseaddrfp = NULL; -int baseaddrnum = 0; +static FILE *modulesfp = NULL; +static FILE *baseaddrfp = NULL; +static int baseaddrnum = 0; static int modules_read = 0; static struct usb_bus *busses = NULL; static struct usb_device *usbdevice; @@ -72,7 +74,7 @@ void hexdump(unsigned char *buf, int len) { fprintf(stderr,"\n"); } -int usb_deviceinfo(unsigned char *buf) { +static int usb_deviceinfo(unsigned char *buf) { int i,j,k,l; int len = 0; WDU_CONFIGURATION **pConfigs, **pActiveConfig; @@ -232,7 +234,7 @@ int usb_deviceinfo(unsigned char *buf) { return len; } -int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { +static int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) { struct header_struct* wdheader = (struct header_struct*)wdioctl; struct version_struct *version; int ret = 0; @@ -937,3 +939,21 @@ int access(const char *pathname, int mode) { return (*func)(pathname, mode); } } + +#if __WORDSIZE == 32 +int uname (struct utsname *__name) { + static int (*func) (struct utsname*); + int ret; + + if (!func) + func = (int (*) (struct utsname*)) dlsym(RTLD_NEXT, "uname"); + + ret = (*func)(__name); + + if (ret == 0 && (!strcmp(__name->machine, "x86_64"))) { + strcpy(__name->machine, "i686"); + } + + return ret; +} +#endif