Skip to content

Commit 4d39fa0

Browse files
committed
fix BSD and OSX builds
Change-Id: I1b1442c65c4f9d1369289fc9474f62d948207344
1 parent 694d038 commit 4d39fa0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ constexpr auto IA32_PQR_ASSOC = 0xc8f;
303303
constexpr auto IA32_QM_EVTSEL = 0xc8d;
304304
constexpr auto IA32_QM_CTR = 0xc8e;
305305

306+
#ifndef KERNEL
306307
constexpr auto PCM_INVALID_QOS_MONITORING_DATA = (std::numeric_limits<uint64>::max)();
308+
#endif
307309

308310
/* \brief Event Select Register format
309311
@@ -1445,7 +1447,9 @@ struct ICX_IIOPMUCNTCTLRegister
14451447

14461448
constexpr auto MSR_PACKAGE_THERM_STATUS = 0x01B1;
14471449
constexpr auto MSR_IA32_THERM_STATUS = 0x019C;
1450+
#ifndef KERNEL
14481451
constexpr auto PCM_INVALID_THERMAL_HEADROOM = (std::numeric_limits<int32_t>::min)();
1452+
#endif
14491453

14501454
constexpr auto MSR_IA32_BIOS_SIGN_ID = 0x8B;
14511455

src/utils.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#endif
2828

2929
#ifndef _MSC_VER
30+
#include <unistd.h>
3031
#include <csignal>
3132
#include <ctime>
3233
#include <cmath>
@@ -36,10 +37,6 @@
3637
#include <map>
3738
#include <unordered_map>
3839

39-
#ifdef __linux__
40-
#include <unistd.h>
41-
#endif
42-
4340
namespace pcm {
4441
std::string safe_getenv(const char* env);
4542
}

0 commit comments

Comments
 (0)