diff options
| author | Jan Beich <jbeich@FreeBSD.org> | 2021-01-19 14:41:02 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-23 09:16:25 +0000 |
| commit | fb660262ab929688f4c7ac1fccd3d6d360ec3475 (patch) | |
| tree | d22792578824c2c97105770c1f37334d99a0e044 | |
| parent | terminal: add/exclude missing headers (diff) | |
uri: switch to conservative maximum hostname length
Current maximum is provided by sysconf(_SC_HOST_NAME_MAX) instead.
uri.c:269:20: error: use of undeclared identifier 'HOST_NAME_MAX'
char this_host[HOST_NAME_MAX];
^
| -rw-r--r-- | uri.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -266,7 +266,7 @@ err: bool hostname_is_localhost(const char *hostname) { - char this_host[HOST_NAME_MAX]; + char this_host[_POSIX_HOST_NAME_MAX]; if (gethostname(this_host, sizeof(this_host)) < 0) this_host[0] = '\0'; |
