OSX doesn't define HOST_NAME_MAX and LOGIN_NAME_MAX.

Fix based on patch from Jack Skalski.
This commit is contained in:
Bartosz Taudul 2018-12-17 15:11:59 +01:00
parent a7e615d42e
commit 083320820f

View File

@ -289,6 +289,13 @@ static const char* GetHostInfo()
ptr += sprintf( ptr, "User: %s@%s\n", user, hostname ); ptr += sprintf( ptr, "User: %s@%s\n", user, hostname );
#else #else
# ifndef HOST_NAME_MAX
const size_t HOST_NAME_MAX = 1024u;
# endif
# ifndef LOGIN_NAME_MAX
const size_t LOGIN_NAME_MAX = 1024u;
# endif
char hostname[HOST_NAME_MAX]; char hostname[HOST_NAME_MAX];
char user[LOGIN_NAME_MAX]; char user[LOGIN_NAME_MAX];