X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Flibiproute%2Fll_proto.c;h=10d749881cb4fef39465e09d2be2b6c76491bb87;hb=7b72fc12000c878e11d5f0b245f83c0d71b29f58;hp=9b5260b3285a5ea95796be1a4d56653a681a6df5;hpb=c7bda1ce659294d6e22c06e087f6f265983c7578;p=oweals%2Fbusybox.git diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 9b5260b32..10d749881 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * ll_proto.c * @@ -9,12 +10,11 @@ * Authors: Alexey Kuznetsov, */ -#include -#include -#include +#include "libbb.h" +#include "rt_names.h" #include "utils.h" -#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 +#if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 #include #else #include @@ -23,7 +23,7 @@ #define __PF(f,n) { ETH_P_##f, #n }, static struct { int id; - char *name; + const char *name; } llproto_names[] = { __PF(LOOP,loop) __PF(PUP,pup) @@ -90,25 +90,25 @@ __PF(ECONET,econet) #undef __PF -char * ll_proto_n2a(unsigned short id, char *buf, int len) +const char * ll_proto_n2a(unsigned short id, char *buf, int len) { - int i; + int i; id = ntohs(id); - for (i=0; i