]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
bsd: compatibility with systems that do not have interface descriptions
authorVincent Bernat <vincent.bernat@dailymotion.com>
Fri, 11 Jan 2013 17:42:50 +0000 (18:42 +0100)
committerVincent Bernat <vincent.bernat@dailymotion.com>
Fri, 11 Jan 2013 17:42:50 +0000 (18:42 +0100)
src/daemon/interfaces-bsd.c

index 7e6d7c32e087e090f280067f091b4b697b3b051d..ff09f169654ae706c569ed47cc1d5169d916c4ee 100644 (file)
@@ -354,6 +354,7 @@ ifbsd_extract_device(struct lldpd *cfg,
                memcpy(iface->address, LLADDR(saddrdl), ETHER_ADDR_LEN);
 
        /* Grab description */
+#ifdef IFDESCRSIZE
 #if defined HOST_OS_FREEBSD || defined HOST_OS_OPENBSD
        iface->alias = malloc(IFDESCRSIZE);
        if (iface->alias) {
@@ -373,7 +374,8 @@ ifbsd_extract_device(struct lldpd *cfg,
                        iface->alias = NULL;
                }
        }
-#endif /* HOST_OS_NETBSD */
+#endif
+#endif /* IFDESCRSIZE */
 
        if (ifbsd_check_wireless(cfg, ifaddr, iface) == -1) {
                interfaces_free_device(iface);