Commits

Marcus Calhoun-Lopez authored 4adad9cbfe6
ptex: fix build on older systems

Fixes https://trac.macports.org/ticket/57495 No revbump since port either builds correctly or not at all
No tags

graphics/ptex/files/patch-lock.diff

Added
1 +--- src/ptex/PtexPlatform.h.orig 2018-04-10 15:47:40.000000000 -0700
2 ++++ src/ptex/PtexPlatform.h 2018-11-02 09:28:24.000000000 -0700
3 +@@ -67,7 +67,7 @@
4 + #include <pthread.h>
5 +
6 + #ifdef __APPLE__
7 +-#include <os/lock.h>
8 ++#include <libkern/OSAtomic.h>
9 + #include <sys/types.h>
10 + #endif
11 + #endif
12 +@@ -136,13 +136,13 @@
13 + #ifdef __APPLE__
14 + class SpinLock {
15 + public:
16 +- SpinLock() { _spinlock = OS_UNFAIR_LOCK_INIT; }
17 ++ SpinLock() { _spinlock = 0; }
18 + ~SpinLock() { }
19 +- void lock() { os_unfair_lock_lock(&_spinlock); }
20 +- bool trylock() { return os_unfair_lock_trylock(&_spinlock); }
21 +- void unlock() { os_unfair_lock_unlock(&_spinlock); }
22 ++ void lock() { OSSpinLockLock(&_spinlock); }
23 ++ bool trylock() { return OSSpinLockTry(&_spinlock); }
24 ++ void unlock() { OSSpinLockUnlock(&_spinlock); }
25 + private:
26 +- os_unfair_lock _spinlock;
27 ++ OSSpinLock _spinlock;
28 + };
29 + #else
30 + class SpinLock {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut