From c92775d26bbff69864cfcba473c077ceabab651a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 14 Jun 2021 22:44:27 +0200 Subject: [PATCH] Try a slightly rougher fix for libretro builds (our builds work, but not their CI) --- Common/Thread/ThreadUtil.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Common/Thread/ThreadUtil.cpp b/Common/Thread/ThreadUtil.cpp index 3b538ee6b0..795647ff32 100644 --- a/Common/Thread/ThreadUtil.cpp +++ b/Common/Thread/ThreadUtil.cpp @@ -16,7 +16,7 @@ #include "Common/Log.h" #include "Common/Thread/ThreadUtil.h" -#if defined(__ANDROID__) || defined(__APPLE__) || PPSSPP_PLATFORM(LINUX) || (defined(__GLIBC__) && defined(_GNU_SOURCE)) +#if defined(__ANDROID__) || defined(__APPLE__) || (defined(__GLIBC__) && defined(_GNU_SOURCE)) #include #include #include @@ -130,7 +130,11 @@ void AssertCurrentThreadName(const char *threadName) { } int GetCurrentThreadIdForDebug() { -#if PPSSPP_PLATFORM(WINDOWS) +#if __LIBRETRO__ + // Not sure why gettid() would not be available, but it isn't. + // The return value of this function is only used in unit tests anyway... + return 1; +#elif PPSSPP_PLATFORM(WINDOWS) return (int)GetCurrentThreadId(); #elif PPSSPP_PLATFORM(MAC) || PPSSPP_PLATFORM(IOS) || defined(__OpenBSD__) || defined(__FreeBSD__) uint64_t tid = 0;