randomizw

android port

git-svn-id: svn://db.shs.com.ru/pip@39 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-03-23 08:49:21 +00:00
parent f89764d6bc
commit cef64a9b80
10 changed files with 40 additions and 16 deletions

View File

@@ -158,8 +158,9 @@ PIInit::PIInit() {
sinfo->user = ps->pw_name;
else {
memset(cbuff, 0, 1024);
if (getlogin_r(cbuff, 1023) == 0)
sinfo->user = cbuff;
char * l = getlogin();
if (l)
sinfo->user = l;
}
struct utsname uns;
if (uname(&uns) == 0) {