Fixed macOS build and compile warning.
This commit is contained in:
parent
631a8ca802
commit
2c8d8ee2ab
2 changed files with 3 additions and 2 deletions
|
@ -71,7 +71,7 @@ rapidjson::Value xmrig::CpuConfig::toJSON(rapidjson::Document &doc) const
|
|||
Value obj(kObjectType);
|
||||
|
||||
obj.AddMember(StringRef(kEnabled), m_enabled, allocator);
|
||||
obj.AddMember(StringRef(kHugePages), m_hugePageSize == 0 || m_hugePageSize == kDefaultHugePageSizeKb ? Value(isHugePages()) : Value(m_hugePageSize), allocator);
|
||||
obj.AddMember(StringRef(kHugePages), m_hugePageSize == 0 || m_hugePageSize == kDefaultHugePageSizeKb ? Value(isHugePages()) : Value(static_cast<uint32_t>(m_hugePageSize)), allocator);
|
||||
obj.AddMember(StringRef(kHugePagesJit), m_hugePagesJit, allocator);
|
||||
obj.AddMember(StringRef(kHwAes), m_aes == AES_AUTO ? Value(kNullType) : Value(m_aes == AES_HW), allocator);
|
||||
obj.AddMember(StringRef(kPriority), priority() != -1 ? Value(priority()) : Value(kNullType), allocator);
|
||||
|
|
|
@ -68,11 +68,12 @@
|
|||
namespace xmrig {
|
||||
|
||||
|
||||
#ifdef XMRIG_OS_LINUX
|
||||
static inline int hugePagesFlag(size_t size)
|
||||
{
|
||||
return (static_cast<int>(log2(size)) & MAP_HUGE_MASK) << MAP_HUGE_SHIFT;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace xmrig
|
||||
|
||||
|
|
Loading…
Reference in a new issue