diff options
author | bunnei <bunneidev@gmail.com> | 2016-10-31 15:33:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 15:33:39 -0400 |
commit | 946b62c03dad318673138d9e9b5030aa7a195206 (patch) | |
tree | a608c553f6c905961ce23647b3282599afd30ce6 /src/common/x64/cpu_detect.cpp | |
parent | dc1e04137c3788a49b042a6aab95a9508cdee484 (diff) | |
parent | 8b833d3a97712de3d547123bd4399ba8b530e2ac (diff) |
Merge pull request #2123 from jbeich/freebsd
Fix build on DragonFly and FreeBSD
Diffstat (limited to 'src/common/x64/cpu_detect.cpp')
-rw-r--r-- | src/common/x64/cpu_detect.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index 6ddf9b70c..370ae2c80 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -12,13 +12,15 @@ namespace Common { #ifndef _MSC_VER -#ifdef __FreeBSD__ -#include <machine/cpufunc.h> +#if defined(__DragonFly__) || defined(__FreeBSD__) +// clang-format off #include <sys/types.h> +#include <machine/cpufunc.h> +// clang-format on #endif static inline void __cpuidex(int info[4], int function_id, int subfunction_id) { -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) // Despite the name, this is just do_cpuid() with ECX as second input. cpuid_count((u_int)function_id, (u_int)subfunction_id, (u_int*)info); #else |