diff options
author | Rob Landley <rob@landley.net> | 2006-06-02 20:53:38 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-02 20:53:38 +0000 |
commit | ecae66ac16338d8cddb55e1782ebd8c5f670ff53 (patch) | |
tree | ec67cd4591e5730790172f99eefd519ad7985e58 | |
parent | ff97ee9abda67ac0b85e0dc97a3d78ee85071cbf (diff) | |
download | busybox-w32-ecae66ac16338d8cddb55e1782ebd8c5f670ff53.tar.gz busybox-w32-ecae66ac16338d8cddb55e1782ebd8c5f670ff53.tar.bz2 busybox-w32-ecae66ac16338d8cddb55e1782ebd8c5f670ff53.zip |
Header cleanup: don't #include headers that libbb.h already includes.
-rw-r--r-- | networking/libiproute/ipaddress.c | 5 | ||||
-rw-r--r-- | networking/libiproute/iplink.c | 20 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 5 | ||||
-rw-r--r-- | networking/libiproute/iptunnel.c | 5 | ||||
-rw-r--r-- | networking/libiproute/libnetlink.c | 3 | ||||
-rw-r--r-- | networking/libiproute/ll_addr.c | 4 | ||||
-rw-r--r-- | networking/libiproute/ll_map.c | 5 | ||||
-rw-r--r-- | networking/libiproute/utils.c | 5 |
8 files changed, 13 insertions, 39 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index a74250621..a048cff99 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -9,16 +9,14 @@ | |||
9 | * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated | 9 | * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "libbb.h" | ||
12 | #include <sys/socket.h> | 13 | #include <sys/socket.h> |
13 | #include <sys/ioctl.h> | 14 | #include <sys/ioctl.h> |
14 | 15 | ||
15 | #include <fnmatch.h> | 16 | #include <fnmatch.h> |
16 | #include <stdlib.h> | ||
17 | #include <string.h> | 17 | #include <string.h> |
18 | #include <unistd.h> | 18 | #include <unistd.h> |
19 | 19 | ||
20 | #include <arpa/inet.h> | ||
21 | |||
22 | #include <net/if.h> | 20 | #include <net/if.h> |
23 | #include <net/if_arp.h> | 21 | #include <net/if_arp.h> |
24 | 22 | ||
@@ -26,7 +24,6 @@ | |||
26 | #include "utils.h" | 24 | #include "utils.h" |
27 | #include "ip_common.h" | 25 | #include "ip_common.h" |
28 | 26 | ||
29 | #include "libbb.h" | ||
30 | 27 | ||
31 | static struct | 28 | static struct |
32 | { | 29 | { |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 12677d522..2797f0250 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -1,21 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * iplink.c "ip link". | 2 | * iplink.c "ip link". |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 4 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
10 | * | 5 | * |
6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
11 | */ | 7 | */ |
12 | 8 | ||
9 | #include "libbb.h" | ||
10 | |||
13 | #include <sys/ioctl.h> | 11 | #include <sys/ioctl.h> |
14 | #include <sys/socket.h> | 12 | #include <sys/socket.h> |
15 | #include <linux/version.h> | ||
16 | 13 | ||
17 | #include <errno.h> | 14 | #include <errno.h> |
18 | #include <stdlib.h> | ||
19 | #include <string.h> | 15 | #include <string.h> |
20 | #include <unistd.h> | 16 | #include <unistd.h> |
21 | 17 | ||
@@ -23,19 +19,12 @@ | |||
23 | #include <net/if_packet.h> | 19 | #include <net/if_packet.h> |
24 | #include <netpacket/packet.h> | 20 | #include <netpacket/packet.h> |
25 | 21 | ||
26 | #if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 | ||
27 | #include <net/ethernet.h> | 22 | #include <net/ethernet.h> |
28 | #else | ||
29 | #include <linux/if_ether.h> | ||
30 | #endif | ||
31 | 23 | ||
32 | #include "rt_names.h" | 24 | #include "rt_names.h" |
33 | #include "utils.h" | 25 | #include "utils.h" |
34 | #include "ip_common.h" | 26 | #include "ip_common.h" |
35 | 27 | ||
36 | #include "libbb.h" | ||
37 | |||
38 | |||
39 | /* take from linux/sockios.h */ | 28 | /* take from linux/sockios.h */ |
40 | #define SIOCSIFNAME 0x8923 /* set interface name */ | 29 | #define SIOCSIFNAME 0x8923 /* set interface name */ |
41 | 30 | ||
@@ -96,7 +85,6 @@ static int do_chflags(char *dev, __u32 flags, __u32 mask) | |||
96 | 85 | ||
97 | static int do_changename(char *dev, char *newdev) | 86 | static int do_changename(char *dev, char *newdev) |
98 | { | 87 | { |
99 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) | ||
100 | struct ifreq ifr; | 88 | struct ifreq ifr; |
101 | int fd; | 89 | int fd; |
102 | int err; | 90 | int err; |
@@ -114,8 +102,6 @@ static int do_changename(char *dev, char *newdev) | |||
114 | } | 102 | } |
115 | close(fd); | 103 | close(fd); |
116 | return err; | 104 | return err; |
117 | #endif | ||
118 | return 0; | ||
119 | } | 105 | } |
120 | 106 | ||
121 | static int set_qlen(char *dev, int qlen) | 107 | static int set_qlen(char *dev, int qlen) |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index a67bc2e44..6052a3023 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -13,9 +13,10 @@ | |||
13 | * Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized | 13 | * Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "libbb.h" | ||
17 | |||
16 | #include <sys/socket.h> | 18 | #include <sys/socket.h> |
17 | 19 | ||
18 | #include <stdlib.h> | ||
19 | #include <string.h> | 20 | #include <string.h> |
20 | #include <fcntl.h> | 21 | #include <fcntl.h> |
21 | #include <unistd.h> | 22 | #include <unistd.h> |
@@ -24,8 +25,6 @@ | |||
24 | #include "utils.h" | 25 | #include "utils.h" |
25 | #include "ip_common.h" | 26 | #include "ip_common.h" |
26 | 27 | ||
27 | #include "libbb.h" | ||
28 | |||
29 | #ifndef RTAX_RTTVAR | 28 | #ifndef RTAX_RTTVAR |
30 | #define RTAX_RTTVAR RTAX_HOPS | 29 | #define RTAX_RTTVAR RTAX_HOPS |
31 | #endif | 30 | #endif |
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index 23b5d5013..1b1458e1e 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c | |||
@@ -13,16 +13,14 @@ | |||
13 | * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag | 13 | * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "libbb.h" | ||
16 | #include <sys/socket.h> | 17 | #include <sys/socket.h> |
17 | #include <sys/ioctl.h> | 18 | #include <sys/ioctl.h> |
18 | 19 | ||
19 | #include <stdlib.h> | ||
20 | #include <string.h> | 20 | #include <string.h> |
21 | #include <unistd.h> | 21 | #include <unistd.h> |
22 | 22 | ||
23 | #include <arpa/inet.h> | ||
24 | #include <netinet/ip.h> | 23 | #include <netinet/ip.h> |
25 | #include <netinet/in.h> | ||
26 | 24 | ||
27 | #include <net/if.h> | 25 | #include <net/if.h> |
28 | #include <net/if_arp.h> | 26 | #include <net/if_arp.h> |
@@ -37,7 +35,6 @@ | |||
37 | #include "utils.h" | 35 | #include "utils.h" |
38 | #include "ip_common.h" | 36 | #include "ip_common.h" |
39 | 37 | ||
40 | #include "libbb.h" | ||
41 | 38 | ||
42 | static int do_ioctl_get_ifindex(char *dev) | 39 | static int do_ioctl_get_ifindex(char *dev) |
43 | { | 40 | { |
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c index ad5bcd70f..93d6d67f0 100644 --- a/networking/libiproute/libnetlink.c +++ b/networking/libiproute/libnetlink.c | |||
@@ -10,10 +10,10 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include "libbb.h" | ||
13 | #include <sys/socket.h> | 14 | #include <sys/socket.h> |
14 | 15 | ||
15 | #include <errno.h> | 16 | #include <errno.h> |
16 | #include <stdio.h> | ||
17 | #include <string.h> | 17 | #include <string.h> |
18 | #include <time.h> | 18 | #include <time.h> |
19 | #include <unistd.h> | 19 | #include <unistd.h> |
@@ -21,7 +21,6 @@ | |||
21 | #include <sys/uio.h> | 21 | #include <sys/uio.h> |
22 | 22 | ||
23 | #include "libnetlink.h" | 23 | #include "libnetlink.h" |
24 | #include "libbb.h" | ||
25 | 24 | ||
26 | void rtnl_close(struct rtnl_handle *rth) | 25 | void rtnl_close(struct rtnl_handle *rth) |
27 | { | 26 | { |
diff --git a/networking/libiproute/ll_addr.c b/networking/libiproute/ll_addr.c index c4c446463..bb89a45a8 100644 --- a/networking/libiproute/ll_addr.c +++ b/networking/libiproute/ll_addr.c | |||
@@ -9,14 +9,14 @@ | |||
9 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 9 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <arpa/inet.h> | 12 | #include "libbb.h" |
13 | |||
13 | #include <string.h> | 14 | #include <string.h> |
14 | #include <net/if_arp.h> | 15 | #include <net/if_arp.h> |
15 | 16 | ||
16 | #include "rt_names.h" | 17 | #include "rt_names.h" |
17 | #include "utils.h" | 18 | #include "utils.h" |
18 | 19 | ||
19 | #include "libbb.h" | ||
20 | 20 | ||
21 | const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen) | 21 | const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen) |
22 | { | 22 | { |
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index 24487eb3d..0ac5ea956 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
@@ -10,14 +10,11 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <stdio.h> | 13 | #include "libbb.h" |
14 | #include <string.h> | 14 | #include <string.h> |
15 | #include <stdlib.h> | ||
16 | #include <netinet/in.h> | ||
17 | 15 | ||
18 | #include "libnetlink.h" | 16 | #include "libnetlink.h" |
19 | #include "ll_map.h" | 17 | #include "ll_map.h" |
20 | #include "libbb.h" | ||
21 | 18 | ||
22 | struct idxmap | 19 | struct idxmap |
23 | { | 20 | { |
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c index 984f7bed9..3a161ead0 100644 --- a/networking/libiproute/utils.c +++ b/networking/libiproute/utils.c | |||
@@ -10,13 +10,12 @@ | |||
10 | * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses | 10 | * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <stdlib.h> | 13 | #include "libbb.h" |
14 | |||
14 | #include <string.h> | 15 | #include <string.h> |
15 | #include <unistd.h> | 16 | #include <unistd.h> |
16 | #include <arpa/inet.h> | ||
17 | 17 | ||
18 | #include "utils.h" | 18 | #include "utils.h" |
19 | #include "libbb.h" | ||
20 | #include "inet_common.h" | 19 | #include "inet_common.h" |
21 | 20 | ||
22 | int get_integer(int *val, char *arg, int base) | 21 | int get_integer(int *val, char *arg, int base) |