From b096fcc4762687bb3aef7177065a178ac810d687 Mon Sep 17 00:00:00 2001 From: Nicholas Lowell Date: Fri, 7 Feb 2020 10:20:22 -0500 Subject: [PATCH] pthread: wrap header with extern C Other posix headers were already wrapped, this one seems to have been missed so it can be compiled with C++ Signed-off-by: Nicholas Lowell --- include/posix/pthread.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/posix/pthread.h b/include/posix/pthread.h index fc75eaa7c4d..b93b82861d3 100644 --- a/include/posix/pthread.h +++ b/include/posix/pthread.h @@ -17,6 +17,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + enum pthread_state { /* The thread structure is unallocated and available for reuse. */ PTHREAD_TERMINATED = 0, @@ -518,4 +522,8 @@ int pthread_key_delete(pthread_key_t key); int pthread_setspecific(pthread_key_t key, const void *value); void *pthread_getspecific(pthread_key_t key); +#ifdef __cplusplus +} +#endif + #endif /* ZEPHYR_INCLUDE_POSIX_PTHREAD_H_ */