From e49b274abcb24495852ee01f1dd01c2cdd958d96 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 23 Jan 2012 22:56:17 +0100 Subject: [PATCH] Compilation fixes when disabling some part of lldpd --- src/interfaces.c | 4 +--- src/lldp.h | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/interfaces.c b/src/interfaces.c index c35bc840..6244c3d9 100644 --- a/src/interfaces.c +++ b/src/interfaces.c @@ -940,7 +940,6 @@ lldpd_ifh_bond(struct lldpd *cfg, struct ifaddrs *ifap) { struct ifaddrs *ifa; struct lldpd_hardware *hardware; - struct lldpd_port *port; int master; for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { if (!iface_minimal_checks(cfg, ifa)) @@ -976,7 +975,6 @@ lldpd_ifh_bond(struct lldpd *cfg, struct ifaddrs *ifap) lldpd_port_cleanup(cfg, &hardware->h_lport, 0); } - port = &hardware->h_lport; hardware->h_flags = ifa->ifa_flags; ifa->ifa_flags = 0; @@ -988,7 +986,7 @@ lldpd_ifh_bond(struct lldpd *cfg, struct ifaddrs *ifap) /* Fill additional info */ #ifdef ENABLE_DOT3 - port->p_aggregid = master; + hardware->h_lport.p_aggregid = master; #endif iface_macphy(hardware); iface_mtu(cfg, hardware); diff --git a/src/lldp.h b/src/lldp.h index 273cb730..7f7fc723 100644 --- a/src/lldp.h +++ b/src/lldp.h @@ -198,6 +198,7 @@ enum { LLDP_TLV_MED_IV_MODEL = 10, LLDP_TLV_MED_IV_ASSET = 11 }; +#endif #define LLDPMED_CLASS_I 1 #define LLDPMED_CLASS_II 2 @@ -243,6 +244,4 @@ enum { #define LLDPMED_CAP_MDI_PD 0x10 #define LLDPMED_CAP_IV 0x20 -#endif /* ENABLE_LLDPMED */ - #endif /* _LLDP_H */ -- 2.39.5