Merge pull request #666 from ysdragon/fix-openbsd-compilation
Some checks failed
Build branch / build-all (push) Failing after 14s
CodeQL / Analyze (push) Has been cancelled

Fix compilation under OpenBSD
This commit is contained in:
smallmodel 2025-02-08 23:33:58 +01:00 committed by GitHub
commit 03eaa62902
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 6 deletions

View file

@ -89,7 +89,11 @@ extern "C" {
} GSICriticalSection;
typedef void (*GSThreadFunc)(void *arg);
#elif defined(_UNIX) //_LINUX || _MACOSX
#elif defined(_UNIX) // Linux, Mac OS X, openbsd, etc.
#if defined(__OpenBSD__)
#include <pthread.h>
#endif
typedef pthread_mutex_t GSICriticalSection;
typedef struct
{

View file

@ -59,14 +59,13 @@ elseif(UNIX)
target_link_libraries(syslib INTERFACE execinfo m)
else()
target_link_libraries(syslib INTERFACE m)
if (NOT APPLE)
# For when using GLIBC versions older than 2.34
target_link_libraries(syslib INTERFACE rt)
endif()
endif()
endif()
target_link_libraries(syslib INTERFACE stdc++)
if (NOT APPLE)
# For when using GLIBC versions older than 2.34
target_link_libraries(syslib INTERFACE rt)
endif()
endif()
if (APPLE)