all repos — mgba @ d1a51637bc18dc69114dd911507416344e584d79

mGBA Game Boy Advance Emulator

Util: Fix FreeBSD build
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Jun 2015 03:26:07 -0700
commit

d1a51637bc18dc69114dd911507416344e584d79

parent

6529b3edf52665f567cabcb4cf6e59efafe2bf30

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M src/util/threading.hsrc/util/threading.h

@@ -12,6 +12,9 @@ #ifndef DISABLE_THREADING

#ifdef USE_PTHREADS #include <pthread.h> #include <sys/time.h> +#ifdef __FreeBSD__ +#include <pthread_np.h> +#endif #define THREAD_ENTRY void* typedef THREAD_ENTRY (*ThreadEntry)(void*);

@@ -79,7 +82,8 @@ static inline int ThreadSetName(const char* name) {

#ifdef __APPLE__ return pthread_setname_np(name); #elif defined(__FreeBSD__) - return pthread_set_name_np(pthread_self(), name); + pthread_set_name_np(pthread_self(), name); + return 0; #else return pthread_setname_np(pthread_self(), name); #endif