diff --git a/source/async_stack.cpp b/source/async_stack.cpp index f63d9e8b..0970f238 100644 --- a/source/async_stack.cpp +++ b/source/async_stack.cpp @@ -99,8 +99,12 @@ static std::uint64_t get_os_thread_id() { return tid; # elif defined(_WIN32) return std::uint64_t(GetCurrentThreadId()); -# else +# elif defined(__EMSCRIPTEN__) + return 0; +# elif defined(__linux__) return std::uint64_t(gettid()); +# else +# error "Unsupported platform in get_os_thread_id" # endif } #endif // UNIFEX_ASYNC_STACK_ROOT_USE_PTHREAD == 0