002-fix-uclibc-sysconf.patch 375 B

1234567891011
  1. --- a/src/addrwatch.c
  2. +++ b/src/addrwatch.c
  3. @@ -492,7 +492,7 @@ int main(int argc, char *argv[])
  4. argp_parse(&argp, argc, argv, 0, &optind, 0);
  5. if (!cfg.hostname) {
  6. - cfg.hostname_len = sysconf(_SC_HOST_NAME_MAX);
  7. + cfg.hostname_len = HOST_NAME_MAX;
  8. cfg.hostname = (char *)calloc(cfg.hostname_len, sizeof(char));
  9. gethostname(cfg.hostname, cfg.hostname_len);
  10. }