macOS fix
This commit is contained in:
parent
04dfd25c74
commit
54ca483cc7
|
|
@ -16,7 +16,7 @@
|
|||
#include <ctime>
|
||||
#include <filesystem>
|
||||
|
||||
#if defined(NAZARA_PLATFORM_MACOSX)
|
||||
#if defined(NAZARA_PLATFORM_MACOS)
|
||||
#define Stat stat
|
||||
#define Fstat fstat
|
||||
#define Off_t off_t
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <Nazara/Core/Functor.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
#if defined(NAZARA_PLATFORM_MACOSX)
|
||||
#if defined(NAZARA_PLATFORM_MACOS)
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ namespace Nz
|
|||
pthread_cond_t TaskSchedulerImpl::s_cvNotEmpty;
|
||||
pthread_barrier_t TaskSchedulerImpl::s_barrier;
|
||||
|
||||
#if defined(NAZARA_PLATFORM_MACOSX)
|
||||
#if defined(NAZARA_PLATFORM_MACOS)
|
||||
//Code from https://blog.albertarmea.com/post/47089939939/using-pthreadbarrier-on-mac-os-x
|
||||
int TaskSchedulerImpl::pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <queue>
|
||||
#include <pthread.h>
|
||||
|
||||
#if defined(NAZARA_PLATFORM_MACOSX)
|
||||
#if defined(NAZARA_PLATFORM_MACOS)
|
||||
typedef int pthread_barrierattr_t;
|
||||
typedef struct
|
||||
{
|
||||
|
|
@ -57,7 +57,7 @@ namespace Nz
|
|||
static pthread_cond_t s_cvNotEmpty;
|
||||
static pthread_barrier_t s_barrier;
|
||||
|
||||
#if defined(NAZARA_PLATFORM_MACOSX)
|
||||
#if defined(NAZARA_PLATFORM_MACOS)
|
||||
static int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count);
|
||||
static int pthread_barrier_destroy(pthread_barrier_t *barrier);
|
||||
static int pthread_barrier_wait(pthread_barrier_t *barrier);
|
||||
|
|
|
|||
Loading…
Reference in New Issue