Subject: bin/14929: 9Dec pullup of mlxctl doesn't compile on 1-5-branch
To: None <gnats-bugs@gnats.netbsd.org>
From: None <windsor@warthog.com>
List: netbsd-bugs
Date: 12/12/2001 14:40:08
>Number:         14929
>Category:       bin
>Synopsis:       9Dec pullup of mlxctl doesn't compile on 1-5-branch
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 12 12:41:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Rob Windsor
>Release:        NetBSD 1.5.3_ALPHA
>Organization:
Nose Pickers Anonymous
>Environment:
System: NetBSD dasher 1.5.3_ALPHA NetBSD 1.5.3_ALPHA (DASHER) #33: Sun Dec 2 12:17:11 CST 2001 windsor@dasher:/usr/src/sys/arch/i386/compile/DASHER i386


>Description:
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -c main.c
cc1: warnings being treated as errors
main.c: In function `usage':
main.c:155: warning: implicit declaration of function `getprogname'
main.c:155: warning: format argument is not a pointer (arg 3)
*** Error code 1

>How-To-Repeat:
	Try to compile it
>Fix:
	Apply following patch:


--- main.c.FCS	Wed Dec 12 14:34:37 2001
+++ main.c	Wed Dec 12 14:35:28 2001
@@ -58,6 +58,8 @@
 
 #include "extern.h"
 
+extern	char *__progname;	/* from crt0.o */
+
 const char	*mlxname;
 const char	*memf;
 const char	*nlistf;
@@ -152,7 +154,7 @@
 {
 
 	(void)fprintf(stderr, "usage: %s [-f dev] [-av] command [...]\n",
-	    getprogname());
+	    __progname);
 	exit(EXIT_FAILURE);
 	/* NOTREACHED */
 }

>Release-Note:
>Audit-Trail:
>Unformatted: