Skip to content

Commit

Permalink
fix BSD and OSX builds
Browse files Browse the repository at this point in the history
Change-Id: I1b1442c65c4f9d1369289fc9474f62d948207344
  • Loading branch information
rdementi committed May 22, 2024
1 parent d1d2d06 commit 140c0fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ constexpr auto IA32_PQR_ASSOC = 0xc8f;
constexpr auto IA32_QM_EVTSEL = 0xc8d;
constexpr auto IA32_QM_CTR = 0xc8e;

#ifndef KERNEL
constexpr auto PCM_INVALID_QOS_MONITORING_DATA = (std::numeric_limits<uint64>::max)();
#endif

/* \brief Event Select Register format
Expand Down Expand Up @@ -1445,7 +1447,9 @@ struct ICX_IIOPMUCNTCTLRegister

constexpr auto MSR_PACKAGE_THERM_STATUS = 0x01B1;
constexpr auto MSR_IA32_THERM_STATUS = 0x019C;
#ifndef KERNEL
constexpr auto PCM_INVALID_THERMAL_HEADROOM = (std::numeric_limits<int32_t>::min)();
#endif

constexpr auto MSR_IA32_BIOS_SIGN_ID = 0x8B;

Expand Down
5 changes: 1 addition & 4 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#endif

#ifndef _MSC_VER
#include <unistd.h>
#include <csignal>
#include <ctime>
#include <cmath>
Expand All @@ -36,10 +37,6 @@
#include <map>
#include <unordered_map>

#ifdef __linux__
#include <unistd.h>
#endif

namespace pcm {
std::string safe_getenv(const char* env);
}
Expand Down

0 comments on commit 140c0fe

Please sign in to comment.