From 0f08e53535a7a1c0d4f7699f2e4224a255921559 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 20 Jun 2003 09:05:00 +0000 Subject: Patch from Lars Kellogg-Stedman: I'm building BusyBox using a development kit for MontaVista Hardhat Linux (PPC) -- which, at least in this instance, is based around kernel 2.2.14. I've had to massage a few files in networking/libiproute/ to make it compile. Specifically: (1) Added a #include for the iovec structure in libnetlink.c, (2) Put ifdefs in ll_types.c and ll_proto.c around various constants (ETH_P_xxx and ARPHRD_xxx) that weren't defined, (3) Make do_changename() in iplink.c require a kernel >= 2.4.0 -- the ifr structure in my environment doesn't have the ifr_name attribute. I've assumed this is a kernel dependency -- let me know if I ought to be checking something else. In the absence of the correct kernel, do_changename() always returns 0. Attached is a patch against the current CVS that will make these changes. -- Lars --- networking/libiproute/iplink.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'networking/libiproute/iplink.c') diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index f826ba081..daab6938d 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -95,6 +96,7 @@ 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; @@ -112,6 +114,8 @@ static int do_changename(char *dev, char *newdev) } close(fd); return err; +#endif + return 0; } static int set_qlen(char *dev, int qlen) -- cgit v1.2.3