trojan-gfw / trojan

An unidentifiable mechanism that helps you bypass GFW.
https://trojan-gfw.github.io/trojan/
GNU General Public License v3.0
18.93k stars 3.04k forks source link

[BUG] Build Failed on GNU/Hurd #183

Closed GreaterFire closed 4 years ago

GreaterFire commented 4 years ago

https://github.com/trojan-gfw/trojan/blob/18763b7529963efef8dcb01f50389a6f49213ae1/src/core/service.cpp#L29-L31

In GNU/Hurd, __MACH__ is also defined, but the macOS specific header file doesn't exist.

wongsyrone commented 4 years ago

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__)

https://www.gnu.org/software/hurd/hurd/porting/guidelines.html