diff options
author | Bernhard Reutner-Fischer | 2006-01-22 22:55:11 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-01-22 22:55:11 +0000 |
commit | 86f5c9906beac527f3d7966f24811b571a589e08 (patch) | |
tree | 1c9eba853c728b5d734506e1c66c269d96fe46ea /networking/libiproute | |
parent | 2edf52643d3eb3d13f26d31f9678cf122f2063bc (diff) | |
download | busybox-86f5c9906beac527f3d7966f24811b571a589e08.zip busybox-86f5c9906beac527f3d7966f24811b571a589e08.tar.gz |
- add platform.h.
- use shorter boilerplate while at it.
Diffstat (limited to 'networking/libiproute')
-rw-r--r-- | networking/libiproute/ip_common.h | 5 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 2 | ||||
-rw-r--r-- | networking/libiproute/utils.h | 9 |
3 files changed, 10 insertions, 6 deletions
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h index 25e9c6c8..71be826 100644 --- a/networking/libiproute/ip_common.h +++ b/networking/libiproute/ip_common.h @@ -1,3 +1,5 @@ +#ifndef _IP_COMMON_H +#define _IP_COMMON_H 1 extern int preferred_family; extern char * _SL_; @@ -5,7 +7,7 @@ extern void ip_parse_common_args(int *argcp, char ***argvp); extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); extern int ipaddr_list_or_flush(int argc, char **argv, int flush); extern int iproute_monitor(int argc, char **argv); -extern void iplink_usage(void) __attribute__((noreturn)); +extern void iplink_usage(void) ATTRIBUTE_NORETURN; extern void ipneigh_reset_filter(void); extern int do_ipaddr(int argc, char **argv); extern int do_iproute(int argc, char **argv); @@ -16,3 +18,4 @@ extern int do_iplink(int argc, char **argv); extern int do_ipmonitor(int argc, char **argv); extern int do_multiaddr(int argc, char **argv); extern int do_multiroute(int argc, char **argv); +#endif /* ip_common.h */ diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index a15fc81..b622afd 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c @@ -63,7 +63,7 @@ static int flush_update(void) return 0; } -static int print_route(struct sockaddr_nl *who __attribute__((unused)), +static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED, struct nlmsghdr *n, void *arg) { FILE *fp = (FILE*)arg; diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index e79e177..3d223ed 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h @@ -7,6 +7,7 @@ #include "libnetlink.h" #include "ll_map.h" #include "rtm_map.h" +#include "libbb.h" extern int preferred_family; extern int show_stats; @@ -26,7 +27,7 @@ extern char * _SL_; #define SPRINT_BSIZE 64 #define SPRINT_BUF(x) char x[SPRINT_BSIZE] -extern void incomplete_command(void) __attribute__((noreturn)); +extern void incomplete_command(void) ATTRIBUTE_NORETURN; #define NEXT_ARG() do { argv++; if (--argc <= 0) incomplete_command(); } while(0) @@ -76,9 +77,9 @@ extern int get_s8(__s8 *val, char *arg, int base); 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(char *, char *) __attribute__((noreturn)); -void duparg(char *, char *) __attribute__((noreturn)); -void duparg2(char *, char *) __attribute__((noreturn)); +void invarg(char *, char *) ATTRIBUTE_NORETURN; +void duparg(char *, char *) ATTRIBUTE_NORETURN; +void duparg2(char *, char *) ATTRIBUTE_NORETURN; int matches(char *arg, char *pattern); extern int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits); |