From dd55e64907297154a1d452f497086f4822dbff2b Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 13 Aug 2017 06:19:37 +0200 Subject: [PATCH] interfaces: fix compilation without Dot3 feature --- src/daemon/interfaces-linux.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/daemon/interfaces-linux.c b/src/daemon/interfaces-linux.c index 1b5664c2..b61d1293 100644 --- a/src/daemon/interfaces-linux.c +++ b/src/daemon/interfaces-linux.c @@ -432,6 +432,7 @@ iflinux_get_permanent_mac(struct lldpd *cfg, iflinux_get_permanent_mac_bond(cfg, interfaces, iface); } +#ifdef ENABLE_DOT3 #define ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32 (SCHAR_MAX) #define ETHTOOL_DECLARE_LINK_MODE_MASK(name) \ uint32_t name[ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32] @@ -551,7 +552,6 @@ end: static void iflinux_macphy(struct lldpd *cfg, struct lldpd_hardware *hardware) { -#ifdef ENABLE_DOT3 struct ethtool_link_usettings uset; struct lldpd_port *port = &hardware->h_lport; int j; @@ -643,8 +643,14 @@ iflinux_macphy(struct lldpd *cfg, struct lldpd_hardware *hardware) } if (uset.base.port == PORT_AUI) port->p_macphy.mau_type = LLDP_DOT3_MAU_AUI; } -#endif } +#else /* ENABLE_DOT3 */ +static void +iflinux_macphy(struct lldpd *cfg, struct lldpd_hardware *hardware) +{ +} +#endif /* ENABLE_DOT3 */ + struct bond_master { char name[IFNAMSIZ]; -- 2.39.2