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
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox