Subject: pkg/36929: net/tacacs fails to build with gcc4
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Yakovetsky Vladimir <yx@x.ua>
List: pkgsrc-bugs
Date: 09/06/2007 07:30:01
>Number:         36929
>Category:       pkg
>Synopsis:       net/tacacs: fails to build with gcc4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 06 07:30:00 +0000 2007
>Originator:     Yakovetsky Vladimir
>Release:        NetBSD 4.0_RC1
>Organization:
>Environment:
System: NetBSD darg.x.ua 4.0_RC1 NetBSD 4.0_RC1 (darg-1.799.2.13-mp-1.8.8.1) #2: Tue Sep 4 16:39:17 EEST 2007 yx@darg.x.ua:/sys/arch/i386/compile/darg.mp i386
Architecture: i386
Machine: i386
>Description:
	gcc4 issue: net/tacacs fails to build

>How-To-Repeat:
% cd /usr/pkgsrc/net/tacacs
% make
...
cc     -DNETBSD -DTAC_PLUS_PIDFILE=\"/var/run/tac_plus.pid\" -DMAXSESS  -c config.c
config.c:99: error: static declaration of 'nopasswd_str' follows non-static declaration
parse.h:22: error: previous declaration of 'nopasswd_str' was here
*** Error code 1

Stop.

>Fix:
:r /usr/pkgsrc/net/tacacs/patches/patch-af
--- parse.h.orig
+++ parse.h
@@ -18,8 +18,12 @@
    FITNESS FOR A PARTICULAR PURPOSE.
 */
 
+#ifdef __GNUC__
+#if __GNUC__ < 4
 /* Dummy password, if nopasswd is specified */
 extern char *nopasswd_str;
+#endif
+#endif
 
 /* Keywords & values */