Commit | Line | Data |
---|---|---|
177088a3 LC |
1 | Starting with libc 2.20, this file would fail to build with "NULL undeclared". |
2 | Include the fine header to solve that. | |
3 | ||
4 | --- net-tools-1.60/lib/ec_hw.c 1999-11-20 22:02:53.000000000 +0100 | |
5 | +++ net-tools-1.60/lib/ec_hw.c 2014-10-06 22:48:43.811027768 +0200 | |
6 | @@ -16,6 +16,7 @@ | |
7 | ||
8 | #if HAVE_HWEC | |
9 | ||
10 | +#include <stddef.h> | |
11 | #include <net/if_arp.h> | |
12 | #include "net-support.h" | |
13 | ||
14 | ||
15 | Avoid "label at end of compound statement" errors. | |
16 | ||
17 | --- net-tools-1.60/lib/inet_sr.c 2000-02-20 22:46:45.000000000 +0100 | |
18 | +++ net-tools-1.60/lib/inet_sr.c 2014-10-06 22:51:22.575023126 +0200 | |
19 | @@ -104,7 +104,6 @@ static int INET_setroute(int action, int | |
20 | isnet = 1; break; | |
21 | case 2: | |
22 | isnet = 0; break; | |
23 | - default: | |
24 | } | |
25 | ||
26 | /* Fill in the other fields. */ | |
27 | ||
28 | --- net-tools-1.60/hostname.c 2001-04-08 19:04:23.000000000 +0200 | |
29 | +++ net-tools-1.60/hostname.c 2014-10-06 23:01:04.235006119 +0200 | |
30 | @@ -77,7 +77,6 @@ static void setnname(char *nname) | |
31 | case EINVAL: | |
32 | fprintf(stderr, _("%s: name too long\n"), program_name); | |
33 | break; | |
34 | - default: | |
35 | } | |
36 | exit(1); | |
37 | } | |
38 | @@ -97,7 +96,6 @@ static void sethname(char *hname) | |
39 | case EINVAL: | |
40 | fprintf(stderr, _("%s: name too long\n"), program_name); | |
41 | break; | |
42 | - default: | |
43 | } | |
44 | exit(1); | |
45 | }; | |
46 | @@ -116,7 +114,6 @@ static void setdname(char *dname) | |
47 | case EINVAL: | |
48 | fprintf(stderr, _("%s: name too long\n"), program_name); | |
49 | break; | |
50 | - default: | |
51 | } | |
52 | exit(1); | |
53 | }; | |
54 | @@ -173,7 +170,6 @@ static void showhname(char *hname, int c | |
55 | *p = '\0'; | |
56 | printf("%s\n", hp->h_name); | |
57 | break; | |
58 | - default: | |
59 | } | |
60 | } | |
61 | ||
62 | ||
63 | Work around the assumption that an 'x25_address' typedef exists. | |
64 | ||
65 | --- net-tools-1.60/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 | |
66 | +++ net-tools-1.60/lib/x25_sr.c 2014-10-06 22:59:35.787008705 +0200 | |
67 | @@ -77,7 +77,7 @@ static int X25_setroute(int action, int | |
68 | rt.sigdigits=sigdigits; | |
69 | ||
70 | /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ | |
71 | - memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); | |
72 | + memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); | |
73 | ||
74 | while (*args) { | |
75 | if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { | |
76 | ||
77 | ||
78 | Fix the multi-line string literal syntax. | |
79 | ||
80 | --- net-tools-1.60/mii-tool.c 2000-05-21 16:31:17.000000000 +0200 | |
81 | +++ net-tools-1.60/mii-tool.c 2014-10-06 23:07:42.002994489 +0200 | |
82 | @@ -379,16 +379,16 @@ static void watch_one_xcvr(int skfd, cha | |
83 | /*--------------------------------------------------------------------*/ | |
84 | ||
85 | const char *usage = | |
86 | -"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...] | |
87 | - -V, --version display version information | |
88 | - -v, --verbose more verbose output | |
89 | - -R, --reset reset MII to poweron state | |
90 | - -r, --restart restart autonegotiation | |
91 | - -w, --watch monitor for link status changes | |
92 | - -l, --log with -w, write events to syslog | |
93 | - -A, --advertise=media,... advertise only specified media | |
94 | - -F, --force=media force specified media technology | |
95 | -media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, | |
96 | +"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n\ | |
97 | + -V, --version display version information\n\ | |
98 | + -v, --verbose more verbose output\n\ | |
99 | + -R, --reset reset MII to poweron state\n\ | |
100 | + -r, --restart restart autonegotiation\n\ | |
101 | + -w, --watch monitor for link status changes\n\ | |
102 | + -l, --log with -w, write events to syslog\n\ | |
103 | + -A, --advertise=media,... advertise only specified media\n\ | |
104 | + -F, --force=media force specified media technology\n\ | |
105 | +media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n\ | |
106 | (to advertise both HD and FD) 100baseTx, 10baseT\n"; | |
107 | ||
108 | int main(int argc, char **argv) |