mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
addrwatch: new package
Maintainer: Ondrej Caletka / @Oskar456 Compile tested: TurrisOS 3.1 (fork of OpenWRT Chaos Calmer), Trunk (both uClibC and musl) Run tested: mpc85xx - Turris 1.0 - TurrisOS - no problems observed Upstream: https://github.com/fln/addrwatch / @fln Description: This is a tool similar to arpwatch. It's main purpose is to monitor network and log discovered ethernet/ip pairings. The package has been UCIfied, care has been taken to reload the deamon every time an interface goes up or down. Signed-off-by: Ondřej Caletka <ondrej@caletka.cz>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/src/addrwatch.c
|
||||
+++ b/src/addrwatch.c
|
||||
@@ -492,7 +492,7 @@ int main(int argc, char *argv[])
|
||||
argp_parse(&argp, argc, argv, 0, &optind, 0);
|
||||
|
||||
if (!cfg.hostname) {
|
||||
- cfg.hostname_len = sysconf(_SC_HOST_NAME_MAX);
|
||||
+ cfg.hostname_len = HOST_NAME_MAX;
|
||||
cfg.hostname = (char *)calloc(cfg.hostname_len, sizeof(char));
|
||||
gethostname(cfg.hostname, cfg.hostname_len);
|
||||
}
|
||||
Reference in New Issue
Block a user