From 61eddbd1facb1cee1b39d2fa1db08e3a790d2120 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 30 Jul 2016 23:58:02 +0100 Subject: [PATCH] Fix Linux build --- src/common/memory_util.cpp | 1 + src/common/x64/cpu_detect.cpp | 2 +- tests/arm/fuzz_thumb.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp index 1f19d06c..55ea11c7 100644 --- a/src/common/memory_util.cpp +++ b/src/common/memory_util.cpp @@ -11,6 +11,7 @@ #include "common/string_util.h" #else #include + #include #include #endif diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index ddf557fd..a1fe8b16 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -82,7 +82,7 @@ static CPUCaps Detect() { caps.vendor = CPUVendor::OTHER; // Set reasonable default brand string even if brand string not available - strcpy_s(caps.cpu_string, sizeof(caps.cpu_string), caps.brand_string); + strncpy(caps.cpu_string, caps.brand_string, sizeof(caps.cpu_string)); // Detect family and other miscellaneous features if (max_std_fn >= 1) { diff --git a/tests/arm/fuzz_thumb.cpp b/tests/arm/fuzz_thumb.cpp index c3c2d88c..d1c200cf 100644 --- a/tests/arm/fuzz_thumb.cpp +++ b/tests/arm/fuzz_thumb.cpp @@ -231,12 +231,12 @@ void FuzzJitThumb(const size_t instruction_count, const size_t instructions_to_e printf("\nInterp Write Records:\n"); for (auto& record : interp_write_records) { - printf("%zu [%x] = %llx\n", record.size, record.address, record.data); + printf("%zu [%x] = %" PRIu64 "\n", record.size, record.address, record.data); } printf("\nJIT Write Records:\n"); for (auto& record : jit_write_records) { - printf("%zu [%x] = %llx\n", record.size, record.address, record.data); + printf("%zu [%x] = %" PRIu64 "\n", record.size, record.address, record.data); } Dynarmic::IR::Block ir_block = Dynarmic::Arm::Translate({0, true, false, 0}, MemoryRead32);