From 64bdf82265bfb7e44e947224aa3c80864fec1dbb Mon Sep 17 00:00:00 2001 From: Mr-LiuSw <33505548+Mr-LiuSw@users.noreply.github.com> Date: Tue, 16 Apr 2019 11:05:36 +0800 Subject: [PATCH] add little changes in hip_runtime_api.h to work with c language (#1017) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update hip_runtime_api.h when i try to use mpicc or gcc to compile a c language code which call some hip runtime api , error occured as > /path/to/hcc_detail/hip_runtime_api.h:2268:33: error: unknown type name ‘hipFuncAttributes’; > hipFuncGetAttributes(hipFuncAttributes* attr, const void* func); add ' struct ' for the first parameter of hipFuncGetAttributes will get ride of this problem. --- hipamd/include/hip/hcc_detail/hip_runtime_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/include/hip/hcc_detail/hip_runtime_api.h b/hipamd/include/hip/hcc_detail/hip_runtime_api.h index cee4e81054..ccfe7aefc3 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime_api.h @@ -2549,7 +2549,7 @@ hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, con * @returns hipSuccess, hipErrorInvalidDeviceFunction */ -hipError_t hipFuncGetAttributes(hipFuncAttributes* attr, const void* func); +hipError_t hipFuncGetAttributes(struct hipFuncAttributes* attr, const void* func); struct Agent_global {