Subject: bin/37377: [patch] menuc bug in mdb.c
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <devon.odell@coyotepoint.com>
List: netbsd-bugs
Date: 11/13/2007 16:40:00
>Number:         37377
>Category:       bin
>Synopsis:       [patch] menuc bug in mdb.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 13 16:40:00 +0000 2007
>Originator:     Devon H. O'Dell
>Release:        4.99.34
>Organization:
Coyote Point Systems, Inc.
>Environment:
NetBSD tls-veq-1 4.99.34 NetBSD 4.99.34 (PAREQ) #0: Mon Nov  5 13:30:28 EST 2007  dho@tls-mini-osx.ny.coyotepoint.com:/Volumes/csfs/nbobj/i386/sys/arch/i386/compile/PAREQ i386

>Description:
num_menus Is only declared if dynamic menus are enabled, however it is referenced outside of #ifdef protection in process_menu(). The attached patch to mdb.c generates a declaration for this in case dynamic menus are not used. I think the placement is ok. I worried about the placement of the patch in mdb.c versus doing something else in menu_sys.defs, but I noticed that there are quite a few expectations about various symbols being defined by the generator / used in the defs file, so I figure this fix is as good as any.
>How-To-Repeat:
I'm pretty sure attempting to compile the example in the manpage will fail.
>Fix:
http://binary.databits.net/mdb.diff (applies from src/)