Header cleanup: don't #include headers that libbb.h already includes.
This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)
No binary (build failed)
—
(log yok)
| @@ -9,16 +9,14 @@ | |
| * Laszlo Valko <[email protected]> 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 | |
| { | |
| @@ -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, <[email protected]> | |
| * | |
| + | * 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) | |
| @@ -13,9 +13,10 @@ | |
| * Kunihiro Ishiguro <[email protected]> 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 | |
| @@ -13,16 +13,14 @@ | |
| * Phil Karn <[email protected]> 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) | |
| { | |
| @@ -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) | |
| { | |
| @@ -9,14 +9,14 @@ | |
| * Authors: Alexey Kuznetsov, <[email protected]> | |
| */ | |
| - | #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) | |
| { | |
| @@ -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 | |
| { | |
| @@ -10,13 +10,12 @@ | |
| * Rani Assaf <[email protected]> 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) | |