From: Vincent Bernat Date: Fri, 21 Jun 2013 07:13:01 +0000 (+0200) Subject: lldpd: when no `setproctitle()` available, don't count neighbors X-Git-Tag: 0.7.4~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7103aff39e218da6d18e534f2d344bb4df5bdf7;p=thirdparty%2Flldpd.git lldpd: when no `setproctitle()` available, don't count neighbors --- diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c index 300ae8f0..de7f085d 100644 --- a/src/daemon/lldpd.c +++ b/src/daemon/lldpd.c @@ -216,6 +216,7 @@ lldpd_hardware_cleanup(struct lldpd *cfg, struct lldpd_hardware *hardware) static void lldpd_count_neighbors(struct lldpd *cfg) { +#if HAVE_SETPROCTITLE struct lldpd_chassis *chassis; const char *neighbor; unsigned neighbors = 0; @@ -231,6 +232,9 @@ lldpd_count_neighbors(struct lldpd *cfg) else setproctitle("%d neighbor%s", neighbors, (neighbors > 1)?"s":""); +#else + (void)cfg; +#endif } static void