mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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];
^
This commit is contained in:
parent
ce7df7cc1f
commit
c531c6bc0e
1 changed files with 1 additions and 1 deletions
2
uri.c
2
uri.c
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue