]> git.ipfire.org Git - thirdparty/lldpd.git/commit - src/daemon/lldpd.c
build: use libbsd if available, also use `setproctitle()`
authorVincent Bernat <bernat@luffy.cx>
Fri, 21 Jun 2013 00:55:50 +0000 (02:55 +0200)
committerVincent Bernat <bernat@luffy.cx>
Fri, 21 Jun 2013 00:55:50 +0000 (02:55 +0200)
commit66879d46ac2b03fc7d44952bb29ad7d87335b52e
tree0a5239cc29647fbb4ba0d0ae52826a53fa057a8a
parent3f70e1182aeb96201641526bb1e9a6f064c41b44
build: use libbsd if available, also use `setproctitle()`

The monitor process will be titled "monitor", while the unprivileged
one will have the number of neighbors displayed. We provide an empty
fallback since this function is not essential.

On Linux, we expect `setproctitle()` to be available in `libbsd`. This
makes functions like `strlcpy()` and `fgetln()` also
available. However, the headers are `bsd/string.h`, so we either need
to declare the prototype or include those new headers (or use the
overlay system). A simple thing to do is to detect the usage of libbsd
and include the appropriate headers in this case.
configure.ac
src/compat/compat.h
src/compat/setproctitle.c [new file with mode: 0644]
src/daemon/lldpd.c
src/daemon/priv.c