dmlc / dmlc-core

A common bricks library for building scalable and portable distributed machine learning.
Apache License 2.0
864 stars 520 forks source link

Restrict overmatching MACH ifdef to only trigger on OSX and Mach #674

Closed Zopolis4 closed 1 year ago

Zopolis4 commented 2 years ago

Hurd uses a different version of Mach that does not have mach/clock.h. https://www.gnu.org/software/hurd/hurd/porting/guidelines.html

#ifdef __MACH__
Some applications put Apple Darwin-specific code inside #ifdef __MACH__ guards. Such guard is clearly not enough, since not only Apple uses Mach as a kernel. This should be replaced by #if defined(__MACH__) && defined(__APPLE__)