You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
375 B

--- a/src/addrwatch.c
+++ b/src/addrwatch.c
@@ -485,7 +485,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);
}