From: Vincent Bernat Date: Wed, 2 Apr 2014 13:55:55 +0000 (+0200) Subject: bsd: check of SIOCGIFDESCR instead of IFDESCRSIZE X-Git-Tag: 0.7.8~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fe83ec069145c027fc51608bc60bdb4edf73e53;p=thirdparty%2Flldpd.git bsd: check of SIOCGIFDESCR instead of IFDESCRSIZE IFDESCRSIZE is defined at the beginning of the file and is therefore always defined. Just check if SIOCGIFDESCR exists instead. --- diff --git a/src/daemon/interfaces-bsd.c b/src/daemon/interfaces-bsd.c index 74751503..fda887c2 100644 --- a/src/daemon/interfaces-bsd.c +++ b/src/daemon/interfaces-bsd.c @@ -359,7 +359,7 @@ ifbsd_extract_device(struct lldpd *cfg, memcpy(iface->address, LLADDR(saddrdl), ETHER_ADDR_LEN); /* Grab description */ -#ifdef IFDESCRSIZE +#ifdef SIOCGIFDESCR #if defined HOST_OS_FREEBSD || defined HOST_OS_OPENBSD iface->alias = malloc(IFDESCRSIZE); if (iface->alias) { @@ -380,7 +380,7 @@ ifbsd_extract_device(struct lldpd *cfg, } } #endif -#endif /* IFDESCRSIZE */ +#endif /* SIOCGIFDESCR */ if (ifbsd_check_wireless(cfg, ifaddr, iface) == -1) { interfaces_free_device(iface);