diff options
| author | Eric Andersen <andersen@codepoet.org> | 2003-01-14 08:54:08 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 2003-01-14 08:54:08 +0000 |
| commit | ab4e19afc66e13b6aac7429fdce95d2aa7cb15ae (patch) | |
| tree | 712b347dc89d890fe0d5755ebbbe9c23eb891a4c | |
| parent | 92a06d0943a7890b6e69d9ad955feb6d138713b7 (diff) | |
| download | busybox-w32-ab4e19afc66e13b6aac7429fdce95d2aa7cb15ae.tar.gz busybox-w32-ab4e19afc66e13b6aac7429fdce95d2aa7cb15ae.tar.bz2 busybox-w32-ab4e19afc66e13b6aac7429fdce95d2aa7cb15ae.zip | |
Eliminate most instances where we use linux kernel headers
-Erik
| -rw-r--r-- | libbb/interface.c | 9 | ||||
| -rw-r--r-- | networking/ifconfig.c | 12 | ||||
| -rw-r--r-- | networking/libiproute/iplink.c | 15 | ||||
| -rw-r--r-- | networking/libiproute/iptunnel.c | 9 | ||||
| -rw-r--r-- | networking/libiproute/ll_addr.c | 6 | ||||
| -rw-r--r-- | networking/nameif.c | 4 |
6 files changed, 38 insertions, 17 deletions
diff --git a/libbb/interface.c b/libbb/interface.c index ff7970321..bdb77bc4a 100644 --- a/libbb/interface.c +++ b/libbb/interface.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * that either displays or sets the characteristics of | 15 | * that either displays or sets the characteristics of |
| 16 | * one or more of the system's networking interfaces. | 16 | * one or more of the system's networking interfaces. |
| 17 | * | 17 | * |
| 18 | * Version: $Id: interface.c,v 1.12 2002/11/28 10:20:45 bug1 Exp $ | 18 | * Version: $Id: interface.c,v 1.13 2003/01/14 08:54:06 andersen Exp $ |
| 19 | * | 19 | * |
| 20 | * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> | 20 | * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> |
| 21 | * and others. Copyright 1993 MicroWalt Corporation | 21 | * and others. Copyright 1993 MicroWalt Corporation |
| @@ -93,7 +93,7 @@ static int procnetdev_vsn = 1; | |||
| 93 | 93 | ||
| 94 | 94 | ||
| 95 | #ifdef HAVE_HWSLIP | 95 | #ifdef HAVE_HWSLIP |
| 96 | #include <linux/if_slip.h> | 96 | #include <net/if_slip.h> |
| 97 | #endif | 97 | #endif |
| 98 | 98 | ||
| 99 | #if HAVE_AFINET6 | 99 | #if HAVE_AFINET6 |
| @@ -1397,7 +1397,12 @@ static struct hwtype loop_hwtype = { | |||
| 1397 | 1397 | ||
| 1398 | #if HAVE_HWETHER | 1398 | #if HAVE_HWETHER |
| 1399 | #include <net/if_arp.h> | 1399 | #include <net/if_arp.h> |
| 1400 | |||
| 1401 | #if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 | ||
| 1402 | #include <net/ethernet.h> | ||
| 1403 | #else | ||
| 1400 | #include <linux/if_ether.h> | 1404 | #include <linux/if_ether.h> |
| 1405 | #endif | ||
| 1401 | 1406 | ||
| 1402 | /* Display an Ethernet address in readable format. */ | 1407 | /* Display an Ethernet address in readable format. */ |
| 1403 | static char *pr_ether(unsigned char *ptr) | 1408 | static char *pr_ether(unsigned char *ptr) |
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 4c1185899..95cc07ab0 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | * Foundation; either version 2 of the License, or (at | 15 | * Foundation; either version 2 of the License, or (at |
| 16 | * your option) any later version. | 16 | * your option) any later version. |
| 17 | * | 17 | * |
| 18 | * $Id: ifconfig.c,v 1.21 2002/12/27 17:42:01 mjn3 Exp $ | 18 | * $Id: ifconfig.c,v 1.22 2003/01/14 08:54:07 andersen Exp $ |
| 19 | * | 19 | * |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| @@ -38,15 +38,21 @@ | |||
| 38 | #include <ctype.h> /* isdigit and friends */ | 38 | #include <ctype.h> /* isdigit and friends */ |
| 39 | #include <stddef.h> /* offsetof */ | 39 | #include <stddef.h> /* offsetof */ |
| 40 | #include <sys/ioctl.h> | 40 | #include <sys/ioctl.h> |
| 41 | #include <net/if.h> | ||
| 41 | #include <net/if_arp.h> | 42 | #include <net/if_arp.h> |
| 42 | #include <netinet/in.h> | 43 | #include <netinet/in.h> |
| 44 | #if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 | ||
| 45 | #include <netpacket/packet.h> | ||
| 46 | #include <net/ethernet.h> | ||
| 47 | #else | ||
| 48 | #include <asm/types.h> | ||
| 43 | #include <linux/if_ether.h> | 49 | #include <linux/if_ether.h> |
| 44 | #include <net/if.h> | 50 | #endif |
| 45 | #include "inet_common.h" | 51 | #include "inet_common.h" |
| 46 | #include "busybox.h" | 52 | #include "busybox.h" |
| 47 | 53 | ||
| 48 | #ifdef CONFIG_FEATURE_IFCONFIG_SLIP | 54 | #ifdef CONFIG_FEATURE_IFCONFIG_SLIP |
| 49 | # include <linux/if_slip.h> | 55 | # include <net/if_slip.h> |
| 50 | #endif | 56 | #endif |
| 51 | 57 | ||
| 52 | /* I don't know if this is needed for busybox or not. Anyone? */ | 58 | /* I don't know if this is needed for busybox or not. Anyone? */ |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 3b2f4dac1..1cfaf6d6a 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
| @@ -18,10 +18,15 @@ | |||
| 18 | #include <string.h> | 18 | #include <string.h> |
| 19 | #include <unistd.h> | 19 | #include <unistd.h> |
| 20 | 20 | ||
| 21 | #include <linux/if.h> | 21 | #include <net/if.h> |
| 22 | #include <linux/if_packet.h> | 22 | #include <net/if_packet.h> |
| 23 | #include <netpacket/packet.h> | ||
| 24 | |||
| 25 | #if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 | ||
| 26 | #include <net/ethernet.h> | ||
| 27 | #else | ||
| 23 | #include <linux/if_ether.h> | 28 | #include <linux/if_ether.h> |
| 24 | #include <linux/sockios.h> | 29 | #endif |
| 25 | 30 | ||
| 26 | #include "rt_names.h" | 31 | #include "rt_names.h" |
| 27 | #include "utils.h" | 32 | #include "utils.h" |
| @@ -29,6 +34,10 @@ | |||
| 29 | 34 | ||
| 30 | #include "libbb.h" | 35 | #include "libbb.h" |
| 31 | 36 | ||
| 37 | |||
| 38 | /* take from linux/sockios.h */ | ||
| 39 | #define SIOCSIFNAME 0x8923 /* set interface name */ | ||
| 40 | |||
| 32 | static int do_link; | 41 | static int do_link; |
| 33 | 42 | ||
| 34 | static int on_off(char *msg) | 43 | static int on_off(char *msg) |
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index dcf717e7e..1eb17799c 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c | |||
| @@ -25,10 +25,13 @@ | |||
| 25 | 25 | ||
| 26 | #include <arpa/inet.h> | 26 | #include <arpa/inet.h> |
| 27 | #include <netinet/ip.h> | 27 | #include <netinet/ip.h> |
| 28 | #include <netinet/in.h> | ||
| 28 | 29 | ||
| 29 | #define sysinfo kernel_sysinfo | 30 | #include <net/if.h> |
| 30 | #include <linux/if_arp.h> | 31 | #include <net/if_arp.h> |
| 31 | #undef sysinfo | 32 | |
| 33 | #include <asm/types.h> | ||
| 34 | #define __constant_htons htons | ||
| 32 | #include <linux/if_tunnel.h> | 35 | #include <linux/if_tunnel.h> |
| 33 | 36 | ||
| 34 | #include "rt_names.h" | 37 | #include "rt_names.h" |
diff --git a/networking/libiproute/ll_addr.c b/networking/libiproute/ll_addr.c index 08d5b78f8..39e561fe5 100644 --- a/networking/libiproute/ll_addr.c +++ b/networking/libiproute/ll_addr.c | |||
| @@ -11,11 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #include <arpa/inet.h> | 12 | #include <arpa/inet.h> |
| 13 | #include <string.h> | 13 | #include <string.h> |
| 14 | 14 | #include <net/if_arp.h> | |
| 15 | #define sysinfo kernel_sysinfo | ||
| 16 | #include <linux/if_arp.h> | ||
| 17 | #undef sysinfo | ||
| 18 | |||
| 19 | #include "utils.h" | 15 | #include "utils.h" |
| 20 | #include "libbb.h" | 16 | #include "libbb.h" |
| 21 | 17 | ||
diff --git a/networking/nameif.c b/networking/nameif.c index a9d422110..886ff49a8 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
| @@ -32,10 +32,12 @@ | |||
| 32 | #include <string.h> | 32 | #include <string.h> |
| 33 | #include <net/if.h> | 33 | #include <net/if.h> |
| 34 | #include <netinet/ether.h> | 34 | #include <netinet/ether.h> |
| 35 | #include <linux/sockios.h> | ||
| 36 | 35 | ||
| 37 | #include "busybox.h" | 36 | #include "busybox.h" |
| 38 | 37 | ||
| 38 | /* take from linux/sockios.h */ | ||
| 39 | #define SIOCSIFNAME 0x8923 /* set interface name */ | ||
| 40 | |||
| 39 | /* Octets in one ethernet addr, from <linux/if_ether.h> */ | 41 | /* Octets in one ethernet addr, from <linux/if_ether.h> */ |
| 40 | #define ETH_ALEN 6 | 42 | #define ETH_ALEN 6 |
| 41 | 43 | ||
