Added basic Linux support.

This commit is contained in:
XMRig 2021-01-18 16:53:42 +07:00
parent 11e0d3de3a
commit 05e6f66169
No known key found for this signature in database
GPG key ID: 446A53638BE94409
7 changed files with 177 additions and 51 deletions

View file

@ -170,7 +170,7 @@ xmrig::DmiMemory::DmiMemory(dmi_header *h)
return;
}
m_speed = std::max(m_speed, dmi_memory_device_speed(dmi_get<uint16_t>(h, 0x20), h->length >= 0x5C ? dmi_get<uint32_t>(h, 0x58) : 0) * 1000000ULL);
m_speed = std::max<uint64_t>(m_speed, dmi_memory_device_speed(dmi_get<uint16_t>(h, 0x20), h->length >= 0x5C ? dmi_get<uint32_t>(h, 0x58) : 0) * 1000000ULL);
if (h->length < 0x28) {
return;