Subject: Re: Build failure
To: None <current-users@netbsd.org>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 12/05/2006 06:56:09
Oops, the previous got truncated.  Here's the complete patch:

RCS file: /cvsroot/src/sys/dev/usb/usb.c,v
retrieving revision 1.92
diff -u -p -r1.92 usb.c
--- usb.c       3 Dec 2006 22:34:58 -0000       1.92
+++ usb.c       5 Dec 2006 14:54:37 -0000
@@ -446,7 +446,9 @@ usbread(dev_t dev, struct uio *uio, int

         useold = 0;
         /* XXXGCC */
+#ifdef COMPAT_30
         ueo = NULL;
+#endif
         switch (uio->uio_resid) {
  #ifdef COMPAT_30
         case sizeof(struct usb_event_old):
@@ -646,10 +648,12 @@ usbioctl(dev_t devt, u_long cmd, caddr_t
                 int addr;
                 usbd_device_handle dev;

-               if (cmd == USB_DEVICEINFO)
-                       addr=di->udi_addr;
-               else
+#ifdef COMPAT_30
+               if (cmd == USB_DEVICEINFO_OLD)
                         addr=dio->udi_addr;
+               else
+#endif
+                       addr=di->udi_addr;
                 if (addr < 1 || addr >= USB_MAX_DEVICES)
                         return (EINVAL);
                 dev = sc->sc_bus->devices[addr];

On Tue, 5 Dec 2006, Paul Goyette wrote:

> Updated via CVS just 15 minutes ago...
>
> #   compile  QUICKY/usb.o
> /usr/src/obj.amd64/tooldir.NetBSD-4.99.4-x86_64/bin/x86_64--netbsd-gcc 
> -mcmodel=kernel -mno-red-zone -ffreestanding -fno-zero-initialized-in-bss -O2 
> -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith 
> -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual
> -Wwrite-strings -Wno-sign-compare -Wno-pointer-sign -Wno-attributes
> -fno-strict-aliasing -Damd64 -Dx86_64 -I. -I/usr/src/sys/../common/include
> -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL
> -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/../../../common/lib/libc/quad
> -I/usr/src/sys/lib/libkern/../../../common/lib/libc/string 
> -I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string 
> -I/usr/src/sys/dist/ipf -c /usr/src/sys/dev/usb/usb.c
>
> /usr/src/sys/dev/usb/usb.c: In function 'usbread':
> /usr/src/sys/dev/usb/usb.c:449: error: 'ueo' undeclared (first use in this 
> funct
> ion)
> /usr/src/sys/dev/usb/usb.c:449: error: (Each undeclared identifier is 
> reported o
> nly once
> /usr/src/sys/dev/usb/usb.c:449: error: for each function it appears in.)
> /usr/src/sys/dev/usb/usb.c: In function 'usbioctl':
> /usr/src/sys/dev/usb/usb.c:652: error: 'dio' undeclared (first use in this 
> funct
> ion)
> *** [usb.o] Error code 1
> 1 error
>
>
> ----------------------------------------------------------------------
> |   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
> | Network Engineer | FA29 0E3B 35AF E8AE 6651 |  paul@whooppee.com   |
> |                  | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
> ----------------------------------------------------------------------
>

----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | FA29 0E3B 35AF E8AE 6651 |  paul@whooppee.com   |
|                  | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------