Android hostname uses ro.product.model as fallback

This commit is contained in:
badaix 2019-12-08 21:25:43 +01:00
parent aa3ce3d5ab
commit 73e42f69cb
2 changed files with 4 additions and 1 deletions

View file

@ -124,6 +124,9 @@ static std::string getHostName()
std::string result = getProp("net.hostname");
if (!result.empty())
return result;
result = getProp("ro.product.model");
if (!result.empty())
return result;
#endif
char hostname[1024];
hostname[1023] = '\0';