Hey there,
I’m packaging DNX for Fedora based on John Calcote’s OpenSUSE specfile, and I ran across the following issue:
DNX relies on the HOST_NAME_MAX macro in common/dnxTcp.h and common/dnxUdp.h. This constant is not guaranteed to work on POSIX systems, and leads to build problems in several versions of Fedora and elsewhere. Instead, sysconf(_SC_HOST_NAME_MAX) should be used at runtime to retrieve the value from the running kernel. I've also added support for MAXHOSTNAMELEN on older Solaris, and fall back to a sensible default (255) on other platforms.
This is defined as a new int, max_hostname, in common/dnxProtocol.c. Changes were made to common/dnxTcp.c and common/dnxUdp.c to make them only error out if the length is greater than 0, as -1 indicates the system does not have a maximum hostname size.
See attached patch.
Patch to fix undefined HOST_NAME_MAX