summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorHao Zhu <[email protected]>2019-01-09 11:28:02 +0800
committerBernard Xiong <[email protected]>2019-01-09 15:13:03 +0800
commitd3c2cb5845d0386d48fd94b4ca02d034f4b6c975 (patch)
tree2c636e85e0f57667651663287b9dd1f998bfd08d /components
parent064688992ec9d8839d79641d1bb787ad0e32328c (diff)
[components][libc] add extern "C" for header file
Diffstat (limited to 'components')
-rw-r--r--components/libc/pthreads/pthread.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/components/libc/pthreads/pthread.h b/components/libc/pthreads/pthread.h
index 6a82375de4..f9a0a92b68 100644
--- a/components/libc/pthreads/pthread.h
+++ b/components/libc/pthreads/pthread.h
@@ -12,6 +12,11 @@
#define __PTHREAD_H__
#include <rtthread.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <posix_types.h>
#include <sched.h>
@@ -262,4 +267,8 @@ int pthread_barrier_init(pthread_barrier_t *barrier,
int pthread_barrier_wait(pthread_barrier_t *barrier);
+#ifdef __cplusplus
+}
+#endif
+
#endif