Fix SSH Agent Build on MSYS Windows (#8708)

This commit is contained in:
Jonathan White 2022-10-29 17:11:08 -04:00 committed by GitHub
parent 188fff1488
commit 6fa34bdbfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,8 +210,8 @@ bool SSHAgent::sendMessagePageant(const QByteArray& in, QByteArray& out)
return false;
}
QByteArray mapName =
(QString("SSHAgentRequest%1").arg(int(QThread::currentThreadId()), 8, 16, QChar('0'))).toLatin1();
auto threadId = reinterpret_cast<qlonglong>(QThread::currentThreadId());
QByteArray mapName = (QString("SSHAgentRequest%1").arg(threadId, 8, 16, QChar('0'))).toLatin1();
HANDLE handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, AGENT_MAX_MSGLEN, mapName.data());