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) |
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 @@ * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated */ +#include "libbb.h" #include <sys/socket.h> #include <sys/ioctl.h> #include <fnmatch.h> -#include <stdlib.h> #include <string.h> #include <unistd.h> -#include <arpa/inet.h> - #include <net/if.h> #include <net/if_arp.h> @@ -26,7 +24,6 @@ #include "utils.h" #include "ip_common.h" -#include "libbb.h" static struct { 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 @@ /* * iplink.c "ip link". * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> * + * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ +#include "libbb.h" + #include <sys/ioctl.h> #include <sys/socket.h> -#include <linux/version.h> #include <errno.h> -#include <stdlib.h> #include <string.h> #include <unistd.h> @@ -23,19 +19,12 @@ #include <net/if_packet.h> #include <netpacket/packet.h> -#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 #include <net/ethernet.h> -#else -#include <linux/if_ether.h> -#endif #include "rt_names.h" #include "utils.h" #include "ip_common.h" -#include "libbb.h" - - /* take from linux/sockios.h */ #define SIOCSIFNAME 0x8923 /* set interface name */ @@ -96,7 +85,6 @@ static int do_chflags(char *dev, __u32 flags, __u32 mask) static int do_changename(char *dev, char *newdev) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) struct ifreq ifr; int fd; int err; @@ -114,8 +102,6 @@ static int do_changename(char *dev, char *newdev) } close(fd); return err; -#endif - return 0; } 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 @@ * Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized */ +#include "libbb.h" + #include <sys/socket.h> -#include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> @@ -24,8 +25,6 @@ #include "utils.h" #include "ip_common.h" -#include "libbb.h" - #ifndef RTAX_RTTVAR #define RTAX_RTTVAR RTAX_HOPS #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 @@ * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag */ +#include "libbb.h" #include <sys/socket.h> #include <sys/ioctl.h> -#include <stdlib.h> #include <string.h> #include <unistd.h> -#include <arpa/inet.h> #include <netinet/ip.h> -#include <netinet/in.h> #include <net/if.h> #include <net/if_arp.h> @@ -37,7 +35,6 @@ #include "utils.h" #include "ip_common.h" -#include "libbb.h" static int do_ioctl_get_ifindex(char *dev) { 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 @@ * */ +#include "libbb.h" #include <sys/socket.h> #include <errno.h> -#include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h> @@ -21,7 +21,6 @@ #include <sys/uio.h> #include "libnetlink.h" -#include "libbb.h" void rtnl_close(struct rtnl_handle *rth) { 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 @@ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */ -#include <arpa/inet.h> +#include "libbb.h" + #include <string.h> #include <net/if_arp.h> #include "rt_names.h" #include "utils.h" -#include "libbb.h" const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen) { 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 @@ * */ -#include <stdio.h> +#include "libbb.h" #include <string.h> -#include <stdlib.h> -#include <netinet/in.h> #include "libnetlink.h" #include "ll_map.h" -#include "libbb.h" struct idxmap { 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 @@ * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses */ -#include <stdlib.h> +#include "libbb.h" + #include <string.h> #include <unistd.h> -#include <arpa/inet.h> #include "utils.h" -#include "libbb.h" #include "inet_common.h" int get_integer(int *val, char *arg, int base) |