From 7a6c962b36a3bc007eca858abc55a0996a708237 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Fri, 9 Feb 2024 02:15:27 +0000 Subject: [PATCH] Fix compile error on certain gcc versions Change-Id: I8a4fab76d1dcc576eb7706ab45fc786c0cab274a [ROCm/ROCR-Runtime commit: 5b28a1bc17beff7f668f985325da785670f06355] --- projects/rocr-runtime/rocrtst/common/helper_funcs.h | 1 + .../runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/rocrtst/common/helper_funcs.h b/projects/rocr-runtime/rocrtst/common/helper_funcs.h index 28e513ccdf..92797afec1 100755 --- a/projects/rocr-runtime/rocrtst/common/helper_funcs.h +++ b/projects/rocr-runtime/rocrtst/common/helper_funcs.h @@ -51,6 +51,7 @@ #include #include +#include #if defined(__GNUC__) #define __forceinline __inline__ __attribute__((always_inline)) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp b/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp index c748a9eeca..5cc878df8c 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp @@ -39,6 +39,7 @@ // DEALINGS WITH THE SOFTWARE. // //////////////////////////////////////////////////////////////////////////////// + #include #include #include @@ -72,7 +73,7 @@ class PackageBuilder { void Write(const T& v) { st_.write((char*)&v, sizeof(T)); } - void Write(const std::vector& v) { st_.write((const char*)v.data(), v.size()); } + void Write(const std::vector& v) { st_.write((const char*)v.data(), v.size()); } void Write(void* data, uint32_t size) { st_.write((const char*)data, size); } bool GetBuffer(void* out) { size_t sz = Size();