diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-12-12 10:21:35 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-12-12 10:21:35 +0000 |
commit | b7d53420033c3bbaea0127d262cfaf52eeea7745 (patch) | |
tree | 695ade23133fe0e31e1f644e5697c9b337414d72 /networking/zcip.c | |
parent | 10fb2b71f3bb8f1c5c1dce43824038021a79ff75 (diff) | |
download | busybox-w32-b7d53420033c3bbaea0127d262cfaf52eeea7745.tar.gz busybox-w32-b7d53420033c3bbaea0127d262cfaf52eeea7745.tar.bz2 busybox-w32-b7d53420033c3bbaea0127d262cfaf52eeea7745.zip |
- fix zcip for IMA compile mode.
rename usage() to zcip_usage, make struct arp_packet static. This applet is
not ISO C89 compatible due to the use of C99-style comments ("c++ comments).
Diffstat (limited to 'networking/zcip.c')
-rw-r--r-- | networking/zcip.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/zcip.c b/networking/zcip.c index 5436cb5da..07bb7fb79 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -65,7 +65,7 @@ | |||
65 | #include <linux/sockios.h> | 65 | #include <linux/sockios.h> |
66 | 66 | ||
67 | 67 | ||
68 | struct arp_packet { | 68 | static struct arp_packet { |
69 | struct ether_header hdr; | 69 | struct ether_header hdr; |
70 | // FIXME this part is netinet/if_ether.h "struct ether_arp" | 70 | // FIXME this part is netinet/if_ether.h "struct ether_arp" |
71 | struct arphdr arp; | 71 | struct arphdr arp; |
@@ -214,8 +214,8 @@ bad: | |||
214 | /** | 214 | /** |
215 | * Print usage information. | 215 | * Print usage information. |
216 | */ | 216 | */ |
217 | static void __attribute__ ((noreturn)) | 217 | static void __attribute__((noreturn)) |
218 | usage(const char *msg) | 218 | zcip_usage(const char *msg) |
219 | { | 219 | { |
220 | fprintf(stderr, "%s: %s\n", prog, msg); | 220 | fprintf(stderr, "%s: %s\n", prog, msg); |
221 | #ifdef NO_BUSYBOX | 221 | #ifdef NO_BUSYBOX |
@@ -284,7 +284,7 @@ int zcip_main(int argc, char *argv[]) | |||
284 | if (inet_aton(optarg, &ip) == 0 | 284 | if (inet_aton(optarg, &ip) == 0 |
285 | || (ntohl(ip.s_addr) & IN_CLASSB_NET) | 285 | || (ntohl(ip.s_addr) & IN_CLASSB_NET) |
286 | != LINKLOCAL_ADDR) { | 286 | != LINKLOCAL_ADDR) { |
287 | usage("invalid link address"); | 287 | zcip_usage("invalid link address"); |
288 | } | 288 | } |
289 | continue; | 289 | continue; |
290 | case 'v': | 290 | case 'v': |
@@ -294,7 +294,7 @@ int zcip_main(int argc, char *argv[]) | |||
294 | foreground = 1; | 294 | foreground = 1; |
295 | continue; | 295 | continue; |
296 | default: | 296 | default: |
297 | usage("bad option"); | 297 | zcip_usage("bad option"); |
298 | } | 298 | } |
299 | } | 299 | } |
300 | if (optind < argc - 1) { | 300 | if (optind < argc - 1) { |
@@ -303,7 +303,7 @@ int zcip_main(int argc, char *argv[]) | |||
303 | script = argv[optind++]; | 303 | script = argv[optind++]; |
304 | } | 304 | } |
305 | if (optind != argc || !intf) | 305 | if (optind != argc || !intf) |
306 | usage("wrong number of arguments"); | 306 | zcip_usage("wrong number of arguments"); |
307 | openlog(prog, 0, LOG_DAEMON); | 307 | openlog(prog, 0, LOG_DAEMON); |
308 | 308 | ||
309 | // initialize the interface (modprobe, ifup, etc) | 309 | // initialize the interface (modprobe, ifup, etc) |