From 2c3f284b857c59808d271ad33c94521b6972b46d Mon Sep 17 00:00:00 2001 From: Xu Jun <693788454@qq.com> Date: Tue, 4 Jan 2022 20:37:01 +0800 Subject: [PATCH] Add extern "C" in libc-builtin-sysroot pthread.h (#933) Add extern "C" in libc-builtin-sysroot pthread.h to fix mulit-thread wasm app compiling error with C++ compiler --- wamr-sdk/app/libc-builtin-sysroot/include/pthread.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wamr-sdk/app/libc-builtin-sysroot/include/pthread.h b/wamr-sdk/app/libc-builtin-sysroot/include/pthread.h index 30841445..71b7fce8 100644 --- a/wamr-sdk/app/libc-builtin-sysroot/include/pthread.h +++ b/wamr-sdk/app/libc-builtin-sysroot/include/pthread.h @@ -6,6 +6,10 @@ #ifndef _WAMR_LIB_PTHREAD_H #define _WAMR_LIB_PTHREAD_H +#ifdef __cplusplus +extern "C" { +#endif + #include /* Data type define of pthread, mutex, cond and key */ @@ -58,4 +62,8 @@ void *pthread_getspecific(pthread_key_t key); int pthread_key_delete(pthread_key_t key); +#ifdef __cplusplus +} +#endif + #endif /* end of _WAMR_LIB_PTHREAD_H */