Merge pull request #424 from fryshorts/bsd-build-fixes

BSD build fixes
This commit is contained in:
Jim
2015-05-05 04:46:16 -07:00
15 changed files with 83 additions and 9 deletions

View File

@@ -26,7 +26,6 @@
#if !defined(__APPLE__)
#include <sys/times.h>
#include <sys/vtimes.h>
#endif
#include "darray.h"

View File

@@ -26,6 +26,10 @@
#include <semaphore.h>
#endif
#if defined(__FreeBSD__)
#include <pthread_np.h>
#endif
#include "bmem.h"
#include "threading.h"
@@ -256,6 +260,8 @@ void os_set_thread_name(const char *name)
{
#if defined(__APPLE__)
pthread_setname_np(name);
#elif defined(__FreeBSD__)
pthread_set_name_np(pthread_self(), name);
#elif !defined(__MINGW32__)
pthread_setname_np(pthread_self(), name);
#endif