ccMSC / ckb

RGB Driver for Linux and OS X
http://forum.corsair.com/v3/showthread.php?t=133929
GNU General Public License v2.0
1.34k stars 170 forks source link

os.h doesn't expect macOS Sierra's new time.h, causes errors and warnings #517

Open dirac-comb opened 7 years ago

dirac-comb commented 7 years ago

As of OSX 10.12 and Xcode 8 time.h contains most of the clock functionality that os.h adds in as missing. This causes warnings as CLOCK_MONOTONIC is overridden and an error when clockid_t is attempted to be overridden with a type mismatch. As is shown in issue #490 the error can be bypassed by commenting out the offending line. It may be possible to just remove this code for OSX >= 10.12 but the details of macOS's implementations do not seem to be documented anywhere I can find. It may just be simpler to rename these functions as not to conflict with the system versions.