Merge pull request #21758 from kreinholz/master

Build fixes for clang on FreeBSD
This commit is contained in:
Henrik Rydgård
2026-05-31 22:47:39 +02:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -1,6 +1,6 @@
#include "ppsspp_config.h"
#if defined(__linux__) && !defined(__ANDROID__)
#if defined(__linux__) || defined(__FreeBSD__) && !defined(__ANDROID__)
# include <dlfcn.h>
#elif defined(_WIN32)
# include <windows.h>
@@ -29,7 +29,7 @@ static bool IsRenderDocLoaded() {
return false;
#elif defined(_WIN32)
return (GetModuleHandleA("renderdoc.dll") != nullptr);
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
// Returns a pointer if loaded, otherwise null
void* handle = dlopen("librenderdoc.so", RTLD_NOW | RTLD_NOLOAD);
if (handle) {
@@ -37,6 +37,8 @@ static bool IsRenderDocLoaded() {
return true;
}
return false;
#else
return false;
#endif
}
+2
View File
@@ -245,6 +245,8 @@ double time_now_unix_utc() {
}
double time_to_unix_utc(double t) {
struct timeval tv;
gettimeofday(&tv, nullptr);
return (double)tv.tv_sec + (double)tv.tv_usec * (1.0 / micros) + t;
}