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

@ -40,14 +40,14 @@ static void dmi_get_header(dmi_header *h, uint8_t *data)
bool xmrig::DmiReader::decode(uint8_t *buf)
{
if (!buf || !m_count) {
if (!buf) {
return false;
}
uint8_t *data = buf;
int i = 0;
while ((i < m_count || !m_count) && data + 4 <= buf + m_size) {
while (data + 4 <= buf + m_size) {
dmi_header h{};
dmi_get_header(&h, data);