parent
371cd5ea21
commit
9fab2fd2bd
6
kike.c
6
kike.c
|
@ -2890,7 +2890,11 @@ irc_initialize_server_name (struct server_context *ctx, struct error **e)
|
|||
}
|
||||
else
|
||||
{
|
||||
char hostname[HOST_NAME_MAX];
|
||||
long host_name_max = sysconf (_SC_HOST_NAME_MAX);
|
||||
if (host_name_max <= 0)
|
||||
host_name_max = _POSIX_HOST_NAME_MAX;
|
||||
|
||||
char hostname[host_name_max + 1];
|
||||
if (gethostname (hostname, sizeof hostname))
|
||||
{
|
||||
error_set (e, "%s: %s",
|
||||
|
|
Loading…
Reference in New Issue