Skip to content

Commit 39116ac

Browse files
committed
Don't provide curtid in C++ mode.
This fixes the build with GCC.
1 parent 1d9b189 commit 39116ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libemulator/posix.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ struct fd_table {
2020
size_t used;
2121
};
2222

23+
// Only provide this in C mode, as _Thread_local may not be provided by
24+
// the compiler in C++ mode.
25+
#ifndef __cplusplus
2326
extern _Thread_local cloudabi_tid_t curtid;
27+
#endif
2428

2529
extern struct syscalls posix_syscalls;
2630

0 commit comments

Comments
 (0)