Looks like my Mac is picky about including HOST_NAME_MAX (see https://stackoverflow.com/questions/30084116/host-name-max-undefined-after-include-limits-h). It needs to be fixed in the CMake.