[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [patch] Allow brctl to compile with kernels < 2.6.7
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2009-01-31 20:06:55
Message-ID: 200901312106.55795.vda.linux () googlemail ! com
[Download RAW message or body]
On Friday 30 January 2009 13:39, Wander Winkelhorst wrote:
> Hello,
>
> The brctl applet doesn't compile with kernels < 2.6.7 because the
> ioctls were renamed in that version.
> I need to work with an ancient kernel (2.4.18) because of some
> vendor-supplied binary-only kernel module that only works in that
> version.
>
> Thanks again for making such a great tool!
>
> So here is the patch against busybox-1.13.2:
You need to just add
#ifndef SIOCBRADDBR
# define SIOCBRADDBR BRCTL_ADD_BRIDGE
#endif
#ifndef SIOCBRDELBR
# define SIOCBRDELBR BRCTL_DEL_BRIDGE
#endif
#ifndef SIOCBRADDIF
# define SIOCBRADDIF BRCTL_ADD_IF
#endif
#ifndef SIOCBRDELIF
# define SIOCBRDELIF BRCTL_DEL_IF
#endif
at the top.
> --- ./brctl.c.org 2009-01-30 13:08:28.000000000 +0100
> +++ brctl.c 2009-01-30 13:08:58.000000000 +0100
> @@ -15,4 +15,5 @@
> #include "libbb.h"
> #include <linux/sockios.h>
> +#include <linux/version.h>
> #include <net/if.h>
>
> @@ -184,5 +185,10 @@
> if (key == ARG_addbr || key == ARG_delbr) { /* addbr or delbr */
> ioctl_or_perror_and_die(fd,
> - key == ARG_addbr ? SIOCBRADDBR
> : SIOCBRDELBR,
> +
> + #if LINUX_VERSION_CODE <
The patch is linewrapped and whitespace damaged.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic