Skip to content

Commit e76d0ee

Browse files
committed
Just declare gettid()
1 parent 21255c0 commit e76d0ee

File tree

1 file changed

+8
-0
lines changed
  • Sources/_TestingInternals/include

1 file changed

+8
-0
lines changed

Sources/_TestingInternals/include/Stubs.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ static int swt_siginfo_t_si_status(const siginfo_t *siginfo) {
152152
#endif
153153
#endif
154154

155+
#if defined(__linux__) || defined(__ANDROID__)
156+
/// Get the current thread's ID.
157+
///
158+
/// This function is redeclared here because it is guarded by `_GNU_SOURCE` in
159+
/// the platform headers.
160+
SWT_EXTERN pid_t gettid(void);
161+
#endif
162+
155163
/// Get the value of `EEXIST`.
156164
///
157165
/// This function is provided because `EEXIST` is a complex macro in wasi-libc

0 commit comments

Comments
 (0)