X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fnameif.c;h=10f13b4bcda72b28d93fc7e7e25315e363111d66;hb=7b08cdd98cdf99b0d2bd622566e9288d44b17529;hp=e74a04213d899ae7b2d8b5a3047aadb4bf9f8607;hpb=cad5364599eb5062d59e0c397ed638ddd61a8d5d;p=oweals%2Fbusybox.git diff --git a/networking/nameif.c b/networking/nameif.c index e74a04213..10f13b4bc 100644 --- a/networking/nameif.c +++ b/networking/nameif.c @@ -1,9 +1,9 @@ /* * nameif.c - Naming Interfaces based on MAC address for busybox. * - * Writen 2000 by Andi Kleen. + * Written 2000 by Andi Kleen. * Busybox port 2002 by Nick Fedchik - * Glenn McGrath + * Glenn McGrath * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,10 +35,19 @@ #include "busybox.h" +/* Older versions of net/if.h do not appear to define IF_NAMESIZE. */ +#ifndef IF_NAMESIZE +# ifdef IFNAMSIZ +# define IF_NAMESIZE IFNAMSIZ +# else +# define IF_NAMESIZE 16 +# endif +#endif + /* take from linux/sockios.h */ #define SIOCSIFNAME 0x8923 /* set interface name */ -/* Octets in one ethernet addr, from */ +/* Octets in one Ethernet addr, from */ #define ETH_ALEN 6 #ifndef ifr_newname