NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/46771: syntax error in net/if_types.h

>Number:         46771
>Category:       kern
>Synopsis:       syntax error in net/if_types.h
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 05 19:25:00 +0000 2012
>Originator:     Benny Siegert <>
>Release:        NetBSD 5.99.51
The NetBSD Foundation
System: NetBSD 5.99.51 NetBSD 5.99.51 (EDAMAME_DOM0) #0: Thu 
Jun 2 16:17:30 CEST 2011 
root@edamame:/usr/obj/sys/arch/amd64/compile/EDAMAME_DOM0 amd64
Architecture: x86_64
Machine: amd64
The IFT_PON622 constant in src/sys/net/if_types.h contains two closing comment
marks. This means that the constant expands to "0x0d */", leading to syntax
errors in code using it. This error was introduced in r1.20, in 2002.

The fix below is trivial. However, I never commit in src/sys so I would prefer
for somebody else to do this change -- including maybe a pullup to NetBSD-5
and -6.
cat > foo.c << EOF
#include <net/if_types.h>

gcc -E foo.c

--- if_types.h.orig     2012-08-05 17:31:33.000000000 +0000
+++ if_types.h  2012-08-05 17:32:02.000000000 +0000
@@ -249,7 +249,7 @@
 #define IFT_DOCSCABLEUPSTREAMCHANNEL 0xcd /* CATV Upstream Channel */
 #define IFT_ECONET                0xce /* Acorn Econet */
 #define IFT_PON155                0xcf /* FSAN 155Mb Symetrical PON interface 
-#define IFT_PON622                0xd0 /* FSAN 622Mb Symetrical PON interface 
+#define IFT_PON622                0xd0 /* FSAN 622Mb Symetrical PON interface 
 #define IFT_BRIDGE                0xd1 /* Transparent bridge interface */
 #define IFT_LINEGROUP             0xd2 /* Interface common to multiple lines */
 #define IFT_VOICEEMFGD            0xd3 /* voice E&M Feature Group D */

Home | Main Index | Thread Index | Old Index