]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpd: when no `setproctitle()` available, don't count neighbors
authorVincent Bernat <bernat@luffy.cx>
Fri, 21 Jun 2013 07:13:01 +0000 (09:13 +0200)
committerVincent Bernat <bernat@luffy.cx>
Fri, 21 Jun 2013 07:27:07 +0000 (09:27 +0200)
src/daemon/lldpd.c

index 300ae8f026396cef6b52bb216cd471117b50e392..de7f085da8b42a3121dc5220fb2c9a2fe4ac7c71 100644 (file)
@@ -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