#include "libbb.h"
+/* #include <net/if.h> - no. linux/if_bonding.h pulls in linux/if.h */
#include <net/if_arp.h>
#include <linux/if_bonding.h>
#include <linux/sockios.h>
-typedef unsigned long long u64; /* hack, so we may include kernel's ethtool.h */
-typedef uint32_t u32; /* ditto */
-typedef uint16_t u16; /* ditto */
-typedef uint8_t u8; /* ditto */
+#ifndef IFNAMSIZ
+#define IFNAMSIZ 16
+#endif
+
+typedef uint64_t u64; /* hack, so we may include kernel's ethtool.h */
+typedef uint32_t u32; /* ditto */
+typedef uint16_t u16; /* ditto */
+typedef uint8_t u8; /* ditto */
#include <linux/ethtool.h>
static int set_ifrname_and_do_ioctl(unsigned request, struct ifreq *ifr, const char *ifname)
{
- strncpy_IFNAMSIZ(ifr->ifr_name, ifname);
+ strncpy_IFNAMSIZ(ifr->ifr_name, ifname);
return ioctl_on_skfd(request, ifr);
}
}
int ifenslave_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int ifenslave_main(int argc ATTRIBUTE_UNUSED, char **argv)
+int ifenslave_main(int argc UNUSED_PARAM, char **argv)
{
char *master_ifname, *slave_ifname;
int rv;