]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Fix compilation issues when DOT1 or DOT3 are not enabled.
authorVincent Bernat <bernat@luffy.cx>
Tue, 7 Jul 2009 07:38:53 +0000 (09:38 +0200)
committerVincent Bernat <bernat@luffy.cx>
Tue, 7 Jul 2009 07:38:53 +0000 (09:38 +0200)
src/edp.c
src/interfaces.c

index 7a628b9dfacfd4b537fb1a11beeba3f63d59ee4c..47f9d81b8d80fafd7df5a9e347ec40bd0b6175db 100644 (file)
--- a/src/edp.c
+++ b/src/edp.c
@@ -228,7 +228,7 @@ edp_decode(struct lldpd *cfg, char *frame, int s,
     struct lldpd_chassis **newchassis, struct lldpd_port **newport)
 {
        struct lldpd_chassis *chassis;
-       struct lldpd_port *port, *oport;
+       struct lldpd_port *port;
 #ifdef ENABLE_DOT1
        struct lldpd_vlan *lvlan = NULL, *lvlan_next;
 #endif
@@ -237,7 +237,10 @@ edp_decode(struct lldpd *cfg, char *frame, int s,
        int edp_port, edp_slot;
        u_int8_t *pos, *pos_edp, *tlv;
        u_int8_t version[4];
+#ifdef ENABLE_DOT1
        struct in_addr address;
+       struct lldpd_port *oport;
+#endif
 
        if ((chassis = calloc(1, sizeof(struct lldpd_chassis))) == NULL) {
                LLOG_WARN("failed to allocate remote chassis");
index 009fabade808a02e8b5622d7827d804037d48b71..046aa03aca86b9629a815524c7d7b61d46ba9fba 100644 (file)
@@ -74,8 +74,10 @@ extern unsigned int if_nametoindex (__const char *__ifname) __THROW;
 extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
 
 static int      iface_is_bridge(struct lldpd *, const char *);
+#ifdef ENABLE_DOT1
 static int      iface_is_bridged_to(struct lldpd *,
     const char *, const char *);
+#endif
 static int      iface_is_wireless(struct lldpd *, const char *);
 static int      iface_is_vlan(struct lldpd *, const char *);
 static int      iface_is_bond(struct lldpd *, const char *);
@@ -159,6 +161,7 @@ iface_is_bridge(struct lldpd *cfg, const char *name)
        return 1;
 }
 
+#ifdef ENABLE_DOT1
 static int
 old_iface_is_bridged_to(struct lldpd *cfg, const char *slave, const char *master)
 {
@@ -205,6 +208,7 @@ iface_is_bridged_to(struct lldpd *cfg, const char *slave, const char *master)
        close(f);
        return 1;
 }
+#endif
 
 static int
 iface_is_vlan(struct lldpd *cfg, const char *name)
@@ -896,7 +900,9 @@ lldpd_ifh_bond(struct lldpd *cfg, struct ifaddrs *ifap)
                iface_port_name_desc(hardware);
                
                /* Fill additional info */
+#ifdef ENABLE_DOT3
                port->p_aggregid = master;
+#endif
                iface_macphy(hardware);
                iface_mtu(cfg, hardware);
        }