diff options
| author | 2016-10-31 15:33:39 -0400 | |
|---|---|---|
| committer | 2016-10-31 15:33:39 -0400 | |
| commit | 946b62c03dad318673138d9e9b5030aa7a195206 (patch) | |
| tree | a608c553f6c905961ce23647b3282599afd30ce6 /src/common/x64/cpu_detect.cpp | |
| parent | Merge pull request #2146 from mailwl/gdbstub-ida-regs (diff) | |
| parent | build: don't install freedesktop.org metadata for SDL2-only builds (diff) | |
| download | yuzu-946b62c03dad318673138d9e9b5030aa7a195206.tar.gz yuzu-946b62c03dad318673138d9e9b5030aa7a195206.tar.xz yuzu-946b62c03dad318673138d9e9b5030aa7a195206.zip | |
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 { | |||
| 12 | 12 | ||
| 13 | #ifndef _MSC_VER | 13 | #ifndef _MSC_VER |
| 14 | 14 | ||
| 15 | #ifdef __FreeBSD__ | 15 | #if defined(__DragonFly__) || defined(__FreeBSD__) |
| 16 | #include <machine/cpufunc.h> | 16 | // clang-format off |
| 17 | #include <sys/types.h> | 17 | #include <sys/types.h> |
| 18 | #include <machine/cpufunc.h> | ||
| 19 | // clang-format on | ||
| 18 | #endif | 20 | #endif |
| 19 | 21 | ||
| 20 | static inline void __cpuidex(int info[4], int function_id, int subfunction_id) { | 22 | static inline void __cpuidex(int info[4], int function_id, int subfunction_id) { |
| 21 | #ifdef __FreeBSD__ | 23 | #if defined(__DragonFly__) || defined(__FreeBSD__) |
| 22 | // Despite the name, this is just do_cpuid() with ECX as second input. | 24 | // Despite the name, this is just do_cpuid() with ECX as second input. |
| 23 | cpuid_count((u_int)function_id, (u_int)subfunction_id, (u_int*)info); | 25 | cpuid_count((u_int)function_id, (u_int)subfunction_id, (u_int*)info); |
| 24 | #else | 26 | #else |