From e7103aff39e218da6d18e534f2d344bb4df5bdf7 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 21 Jun 2013 09:13:01 +0200 Subject: [PATCH] lldpd: when no `setproctitle()` available, don't count neighbors --- src/daemon/lldpd.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.5