Index: packages/Python/lldbsuite/test/tools/lldb-server/exit-code/main.cpp =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-server/exit-code/main.cpp +++ packages/Python/lldbsuite/test/tools/lldb-server/exit-code/main.cpp @@ -18,6 +18,8 @@ int pthread_threadid_np(pthread_t, __uint64_t *); #elif defined(__linux__) #include +#elif defined(__NetBSD__) +#include #endif static const char *const RETVAL_PREFIX = "retval:"; @@ -62,6 +64,9 @@ #elif defined(__linux__) // This is a call to gettid() via syscall. printf("%" PRIx64, static_cast(syscall(__NR_gettid))); +#elif defined(__NetBSD__) + // Technically lwpid_t is 32-bit signed integer + printf("%" PRIx64, static_cast(_lwp_self())); #else printf("{no-tid-support}"); #endif Index: packages/Python/lldbsuite/test/tools/lldb-server/main.cpp =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-server/main.cpp +++ packages/Python/lldbsuite/test/tools/lldb-server/main.cpp @@ -27,6 +27,8 @@ int pthread_threadid_np(pthread_t, __uint64_t *); #elif defined(__linux__) #include +#elif defined(__NetBSD__) +#include #endif static const char *const RETVAL_PREFIX = "retval:"; @@ -71,6 +73,9 @@ #elif defined(__linux__) // This is a call to gettid() via syscall. printf("%" PRIx64, static_cast(syscall(__NR_gettid))); +#elif defined(__NetBSD__) + // Technically lwpid_t is 32-bit signed integer + printf("%" PRIx64, static_cast(_lwp_self())); #else printf("{no-tid-support}"); #endif