libiproute: handle table ids larger than 255
[oweals/busybox.git] / networking / libiproute / ll_types.c
index 38b6c0516633865a1ff5ee966fe7a96cd32583a6..62ee0cc549bcb877755a3bdfb3edb3a0f4e36e69 100644 (file)
@@ -7,6 +7,7 @@
  *
  * 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>
 
@@ -15,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"
@@ -104,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" */