mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-30 06:46:45 -04:00
Replaced HOST_NAME_MAX with portable version
This commit is contained in:
parent
a318fb4efa
commit
0488aa6b5e
1 changed files with 0 additions and 4 deletions
4
osc.c
4
osc.c
|
|
@ -327,11 +327,7 @@ osc_set_pwd(struct terminal *term, char *string)
|
||||||
if (hostname_end == NULL)
|
if (hostname_end == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if __linux__
|
|
||||||
char this_host[HOST_NAME_MAX];
|
|
||||||
#elif __FreeBSD__
|
|
||||||
char this_host[sysconf(_SC_HOST_NAME_MAX)];
|
char this_host[sysconf(_SC_HOST_NAME_MAX)];
|
||||||
#endif
|
|
||||||
if (gethostname(this_host, sizeof(this_host)) < 0)
|
if (gethostname(this_host, sizeof(this_host)) < 0)
|
||||||
this_host[0] = '\0';
|
this_host[0] = '\0';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue