matt-42 / silicon

A high performance, middleware oriented C++14 http web framework please use matt-42/lithium instead
http://siliconframework.org
MIT License
1.72k stars 138 forks source link

the 'usleep' function is defined in 'unistd.h' in MinGW toolchain #54

Closed tedli closed 7 years ago

tedli commented 7 years ago

when building the hello world example using a mingw toolchain, faild with no definition for usleep. do some searching found that the usleep is defined in unistd.h. after add the block

#if defined(__GNUC__) && defined(__MINGW32__)
#include <unistd.h>
#endif

build passed and run as expect.

matt-42 commented 7 years ago

Thanks @tedli for this fix. Happy to hear that silicon compiles with MinGW :)