Subject: kern/32225: unprotected need guardian
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <ezk@cs.sunysb.edu>
List: netbsd-bugs
Date: 12/03/2005 16:44:00
>Number:         32225
>Category:       kern
>Synopsis:       unprotected <msdosfs/msdosfsmount.h> need guardian
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 03 16:44:00 +0000 2005
>Originator:     Erez Zadok
>Release:        2.1
>Organization:
Stony Brook University
>Environment:
NetBSD a-netbsd21 2.1 NetBSD 2.1 (GENERIC) #0: Mon Oct 24 22:35:45 UTC 2005  jmc@faith.netbsd.org:/home/builds/ab/netbsd-2-1-RELEASE/i386/200510241747Z-obj/home/builds/ab/netbsd-2-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386

>Description:
If any source code includes <msdosfs/msdosfsmount.h> twice, a compile error ensues on the re-definition of struct's.  This header needs a standard guardian #ifdef.

In fact, I suggest you audit all /usr/include headers to ensure that each one of them has a guardian.

>How-To-Repeat:
Compile this program:

#include <msdosfs/msdosfsmount.h>
#include <msdosfs/msdosfsmount.h>
>Fix:
#ifdef FOO
#define FOO
... content of header file...
#endif /* FOO */