From: Vincent Bernat Date: Mon, 23 Jan 2012 21:56:17 +0000 (+0100) Subject: Compilation fixes when disabling some part of lldpd X-Git-Tag: 0.6.0~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e49b274abcb24495852ee01f1dd01c2cdd958d96;p=thirdparty%2Flldpd.git Compilation fixes when disabling some part of lldpd --- 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 */