mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
There's no getlogin_t() on android.
This commit is contained in:
parent
c0d140b405
commit
2ebe9b72d1
@ -256,7 +256,19 @@ static const char* GetHostInfo()
|
||||
char user[LOGIN_NAME_MAX];
|
||||
|
||||
gethostname( hostname, HOST_NAME_MAX );
|
||||
# if defined __ANDROID__
|
||||
const auto login = getlogin();
|
||||
if( login )
|
||||
{
|
||||
strcpy( user, login );
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy( user, "(?)", 4 );
|
||||
}
|
||||
# else
|
||||
getlogin_r( user, LOGIN_NAME_MAX );
|
||||
# endif
|
||||
|
||||
ptr += sprintf( ptr, "User: %s@%s\n", user, hostname );
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user