Fixed headers for FreeBSD

This commit is contained in:
Alexander Sieg 2020-04-12 14:50:59 +02:00
parent 6bac1bd257
commit 6d17515646
7 changed files with 28 additions and 0 deletions

4
osc.c
View file

@ -327,7 +327,11 @@ osc_set_pwd(struct terminal *term, char *string)
if (hostname_end == NULL)
return;
#if __linux__
char this_host[HOST_NAME_MAX];
#elif __FreeBSD__
char this_host[sysconf(_SC_HOST_NAME_MAX)];
#endif
if (gethostname(this_host, sizeof(this_host)) < 0)
this_host[0] = '\0';