Skip to content

Commit b096fcc

Browse files
nslowelljhedberg
authored andcommitted
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 <[email protected]>
1 parent dab67c3 commit b096fcc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/posix/pthread.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include <stdlib.h>
1818
#include <string.h>
1919

20+
#ifdef __cplusplus
21+
extern "C" {
22+
#endif
23+
2024
enum pthread_state {
2125
/* The thread structure is unallocated and available for reuse. */
2226
PTHREAD_TERMINATED = 0,
@@ -518,4 +522,8 @@ int pthread_key_delete(pthread_key_t key);
518522
int pthread_setspecific(pthread_key_t key, const void *value);
519523
void *pthread_getspecific(pthread_key_t key);
520524

525+
#ifdef __cplusplus
526+
}
527+
#endif
528+
521529
#endif /* ZEPHYR_INCLUDE_POSIX_PTHREAD_H_ */

0 commit comments

Comments
 (0)