zeroconf/glue: add fallback value for HOST_NAME_MAX

`HOST_NAME_MAX` is not a portable macro; it is undefined on some
systems.

Closes #402
This commit is contained in:
Max Kellermann 2018-11-04 11:12:03 +01:00
parent aba18924ee
commit f2c926f3b6
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@
#include <unistd.h>
#include <limits.h>
#ifndef HOST_NAME_MAX
/* HOST_NAME_MAX is not a portable macro; it is undefined on some
systems */
#define HOST_NAME_MAX 255
#endif
static constexpr Domain zeroconf_domain("zeroconf");
/* The default service name to publish