From a7452b20cdc8069f85bd1a4afa618153f905ba4e Mon Sep 17 00:00:00 2001 From: "osdl.org!shemminger" Date: Wed, 9 Jun 2004 22:51:59 +0000 Subject: [PATCH] Solve build problems on older systems. (Logical change 1.27) --- lib/ll_types.c | 13 ++++++++----- lib/rt_names.c | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/ll_types.c b/lib/ll_types.c index 165ecfa6..920c2bd0 100644 --- a/lib/ll_types.c +++ b/lib/ll_types.c @@ -17,19 +17,22 @@ #include #include #include -#include -#include -#include #include #include #include -char * ll_type_n2a(int type, char *buf, int len) +#include +#include +#include + +#include "rt_names.h" + +const char * ll_type_n2a(int type, char *buf, int len) { #define __PF(f,n) { ARPHRD_##f, #n }, static struct { int type; - char *name; + const char *name; } arphrd_names[] = { { 0, "generic" }, __PF(ETHER,ether) diff --git a/lib/rt_names.c b/lib/rt_names.c index 5db7f2c1..03df086d 100644 --- a/lib/rt_names.c +++ b/lib/rt_names.c @@ -71,7 +71,9 @@ static char * rtnl_rtprot_tab[256] = { [RTPROT_ZEBRA] ="zebra", [RTPROT_BIRD] = "bird", [RTPROT_DNROUTED] = "dnrouted", +#ifdef RTPROT_XORP [RTPROT_XORP] = "xorp", +#endif };