Added DMI reader for macOS.

This commit is contained in:
XMRig 2021-01-19 14:16:03 +07:00
parent 9dffcdaddd
commit 24c290963a
No known key found for this signature in database
GPG key ID: 446A53638BE94409
4 changed files with 122 additions and 6 deletions

View file

@ -70,6 +70,10 @@ bool xmrig::DmiReader::decode(uint8_t *buf)
while (static_cast<uint32_t>(next - buf + 1) < m_size && (next[0] != 0 || next[1] != 0)) {
next++;
}
# ifdef XMRIG_OS_APPLE
while ((unsigned long)(next - buf + 1) < m_size && (next[0] == 0 && next[1] == 0))
# endif
next += 2;
if (static_cast<uint32_t>(next - buf) > m_size) {