libiproute: handle table ids larger than 255
[oweals/busybox.git] / networking / libiproute / ll_types.c
index 3861c2870fe6dbe767999a7ed307742e8ef69901..62ee0cc549bcb877755a3bdfb3edb3a0f4e36e69 100644 (file)
@@ -1,14 +1,13 @@
 /* vi: set sw=4 ts=4: */
 /*
- * ll_types.c
+ * 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 the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
  *
- *             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 the Free Software Foundation; either version
- *             2 of the License, or (at your option) any later version.
- *
- * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
  */
+#include <sys/socket.h> /* linux/if_arp.h needs it on some systems */
 #include <arpa/inet.h>
 #include <linux/if_arp.h>
 
@@ -17,7 +16,7 @@
 
 const char* FAST_FUNC ll_type_n2a(int type, char *buf)
 {
-       static const char arphrd_name[] =
+       static const char arphrd_name[] ALIGN1 =
        /* 0,                  */ "generic" "\0"
        /* ARPHRD_LOOPBACK,    */ "loopback" "\0"
        /* ARPHRD_ETHER,       */ "ether" "\0"
@@ -106,7 +105,7 @@ const char* FAST_FUNC ll_type_n2a(int type, char *buf)
 
        /* Keep these arrays in sync! */
 
-       static const uint16_t arphrd_type[] = {
+       static const uint16_t arphrd_type[] ALIGN2 = {
        0,                  /* "generic" "\0" */
        ARPHRD_LOOPBACK,    /* "loopback" "\0" */
        ARPHRD_ETHER,       /* "ether" "\0" */