]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix compiling on GNU/Hurd. [skip appveyor]
authorDenis Ovsienko <[email protected]>
Sun, 4 Feb 2024 15:31:19 +0000 (15:31 +0000)
committerDenis Ovsienko <[email protected]>
Sun, 4 Feb 2024 15:43:34 +0000 (15:43 +0000)
GNU/Hurd does not define MAXHOSTNAMELEN because it does not define
HOST_NAME_MAX, even if __USE_POSIX is defined.  This causes the
following:

./print-bgp.c:1997:14: error: 'MAXHOSTNAMELEN' undeclared (first use in
  this function)
./print-bgp.c:2965:14: error: 'MAXHOSTNAMELEN' undeclared (first use in
  this function)
./print-icmp.c:502:11: error: 'MAXHOSTNAMELEN' undeclared (first use in
  this function)

However, the above code should not depend on this OS-specific detail to
size its temporary printing buffers, so just hard-code the sizes.


No differences found