Commit a05d4da
Implement a more reliable detection scheme for os_unfair_lock.
The core issue here is the weak linking of the symbol, and in certain
environments--for instance, using the latest Xcode (8.1) with the latest
SDK (10.12)--os_unfair_lock may resolve even though you're compiling on
a host that doesn't support it (10.11).
We can use the availability macros to circumvent this problem, and
detect that we're not compiling for a target that is going to support
them and error out at compile time. The other alternative is to do a
runtime check, but that presents issues for cross-compiling.1 parent e98a620 commit a05d4da
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1708 | 1708 | | |
1709 | 1709 | | |
1710 | 1710 | | |
| 1711 | + | |
1711 | 1712 | | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
1712 | 1716 | | |
1713 | 1717 | | |
1714 | 1718 | | |
| 1719 | + | |
1715 | 1720 | | |
1716 | 1721 | | |
1717 | 1722 | | |
| |||
0 commit comments