No longer needed
[oweals/busybox.git] / networking / nameif.c
index e74a04213d899ae7b2d8b5a3047aadb4bf9f8607..10f13b4bcda72b28d93fc7e7e25315e363111d66 100644 (file)
@@ -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 <nick@fedchik.org.ua>
- *                     Glenn McGrath <bug1@optushome.com.au>
+ *                     Glenn McGrath <bug1@iinet.net.au>
  *
  * 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
 
 #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 <linux/if_ether.h> */
+/* Octets in one Ethernet addr, from <linux/if_ether.h> */
 #define ETH_ALEN       6
 
 #ifndef ifr_newname