[patch] build failure in trunk with networking dir

Erik Hovland erik at hovland.org
Thu Jun 8 11:34:02 PDT 2006


The const of invarg() is not quite right for utils.c and utils.h in
networking/libiproute. Older gcc compilers will kindly ignore it. Newer
gcc (4.x) will bail on it.

This patch should make it right for all compilers.

E

-- 
Erik Hovland
mail: erik AT hovland DOT org
web: http://hovland.org/
PGP/GPG public key available on request
-------------- next part --------------
Index: networking/libiproute/utils.h
===================================================================
--- networking/libiproute/utils.h	(revision 15341)
+++ networking/libiproute/utils.h	(working copy)
@@ -77,7 +77,7 @@
 extern const char *format_host(int af, int len, void *addr, char *buf, int buflen);
 extern const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen);
 
-void invarg(const char const*, const char const*) ATTRIBUTE_NORETURN;
+void invarg(const char *const, const char *const) ATTRIBUTE_NORETURN;
 void duparg(char *, char *) ATTRIBUTE_NORETURN;
 void duparg2(char *, char *) ATTRIBUTE_NORETURN;
 int matches(char *arg, char *pattern);
Index: networking/libiproute/utils.c
===================================================================
--- networking/libiproute/utils.c	(revision 15341)
+++ networking/libiproute/utils.c	(working copy)
@@ -240,7 +240,7 @@
 	exit(-1);
 }
 
-void invarg(const char const *arg, const char const *opt)
+void invarg(const char *const arg, const char *const opt)
 {
 	bb_error_msg(bb_msg_invalid_arg, arg, opt);
 	exit(-1);


More information about the busybox mailing list