From: Denis Ovsienko Date: Sun, 4 Feb 2024 15:31:19 +0000 (+0000) Subject: Fix compiling on GNU/Hurd. [skip appveyor] X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/6cf3ea7d0f7c43440f74c93b95a7864f30fc68b4?hp=6cf3ea7d0f7c43440f74c93b95a7864f30fc68b4 Fix compiling on GNU/Hurd. [skip appveyor] 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. ---