Subject: kern/35997: must needs protect against multiple inclusions at usbdi.h.
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <kiyohara@kk.iij4u.or.jp>
List: netbsd-bugs
Date: 03/13/2007 14:40:00
>Number: 35997
>Category: kern
>Synopsis: must needs protect against multiple inclusions at usbdi.h.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 13 14:40:00 +0000 2007
>Originator: KIYOHARA Takashi
>Release: amd64 -current
>Organization:
>Environment:
NetBSD sins.soum.co.jp 4.99.14 NetBSD 4.99.14 (SINS) #0: Mon Mar 12 13:58:11 JST 2007 lance@sins.soum.co.jp:/sys/arch/amd64/compile/SINS amd64
>Description:
We must need protect against multiple inclusions at usbdi.h.
#ifndef _USBDI_H_
#define _USBDI_H_
#endif
It corrects it since Rev1.57 in FreeBSD.
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usbdi.h.diff?r1=1.56&r2=1.57&f=h
>How-To-Repeat:
>Fix:
Index: sys/dev/usb/usbdi.h
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdi.h,v
retrieving revision 1.72
diff -u -r1.72 usbdi.h
--- sys/dev/usb/usbdi.h 5 Dec 2006 17:35:35 -0000 1.72
+++ sys/dev/usb/usbdi.h 12 Mar 2007 04:29:54 -0000
@@ -38,6 +38,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef _USBDI_H_
+#define _USBDI_H_
+
typedef struct usbd_bus *usbd_bus_handle;
typedef struct usbd_device *usbd_device_handle;
typedef struct usbd_interface *usbd_interface_handle;
@@ -298,3 +301,5 @@
#endif /* USB_USE_SOFTINTR */
#define splhardusb splbio
#define IPL_USB IPL_BIO
+
+#endif /* _USBDI_H_ */