Windows compilation fixes (Thanks LiHuiShuo)

This commit is contained in:
Christophe Dumez 2010-04-28 11:45:13 +00:00
parent e16ca862f4
commit 5675c045ae
6 changed files with 52 additions and 16 deletions

View file

@ -170,8 +170,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
#ifdef Q_WS_WIN
char buffer[UNLEN+1] = {0};
DWORD buffer_len = UNLEN + 1;
if (!GetUserName(buffer, &buffer_len))
uid = QString(buffer)
if (!GetUserNameA(buffer, &buffer_len))
uid = QString(buffer);
#else
uid = QString::number(getuid());
#endif