From ab4e19afc66e13b6aac7429fdce95d2aa7cb15ae Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 14 Jan 2003 08:54:08 +0000 Subject: Eliminate most instances where we use linux kernel headers -Erik --- networking/ifconfig.c | 12 +++++++++--- networking/libiproute/iplink.c | 15 ++++++++++++--- networking/libiproute/iptunnel.c | 9 ++++++--- networking/libiproute/ll_addr.c | 6 +----- networking/nameif.c | 4 +++- 5 files changed, 31 insertions(+), 15 deletions(-) (limited to 'networking') 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 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: ifconfig.c,v 1.21 2002/12/27 17:42:01 mjn3 Exp $ + * $Id: ifconfig.c,v 1.22 2003/01/14 08:54:07 andersen Exp $ * */ @@ -38,15 +38,21 @@ #include /* isdigit and friends */ #include /* offsetof */ #include +#include #include #include +#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 +#include +#include +#else +#include #include -#include +#endif #include "inet_common.h" #include "busybox.h" #ifdef CONFIG_FEATURE_IFCONFIG_SLIP -# include +# include #endif /* 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 @@ #include #include -#include -#include +#include +#include +#include + +#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 +#include +#else #include -#include +#endif #include "rt_names.h" #include "utils.h" @@ -29,6 +34,10 @@ #include "libbb.h" + +/* take from linux/sockios.h */ +#define SIOCSIFNAME 0x8923 /* set interface name */ + static int do_link; 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 @@ #include #include +#include -#define sysinfo kernel_sysinfo -#include -#undef sysinfo +#include +#include + +#include +#define __constant_htons htons #include #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 @@ #include #include - -#define sysinfo kernel_sysinfo -#include -#undef sysinfo - +#include #include "utils.h" #include "libbb.h" 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 @@ #include #include #include -#include #include "busybox.h" +/* take from linux/sockios.h */ +#define SIOCSIFNAME 0x8923 /* set interface name */ + /* Octets in one ethernet addr, from */ #define ETH_ALEN 6 -- cgit v1.2.3