Skip to content

Commit 2c3f284

Browse files
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
1 parent 6b733b8 commit 2c3f284

File tree

1 file changed

+8
-0
lines changed
  • wamr-sdk/app/libc-builtin-sysroot/include

1 file changed

+8
-0
lines changed

wamr-sdk/app/libc-builtin-sysroot/include/pthread.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
#ifndef _WAMR_LIB_PTHREAD_H
77
#define _WAMR_LIB_PTHREAD_H
88

9+
#ifdef __cplusplus
10+
extern "C" {
11+
#endif
12+
913
#include <stdint.h>
1014

1115
/* Data type define of pthread, mutex, cond and key */
@@ -58,4 +62,8 @@ void *pthread_getspecific(pthread_key_t key);
5862

5963
int pthread_key_delete(pthread_key_t key);
6064

65+
#ifdef __cplusplus
66+
}
67+
#endif
68+
6169
#endif /* end of _WAMR_LIB_PTHREAD_H */

0 commit comments

Comments
 (0)