Add missing platform detection in examples/test

This commit is contained in:
Yusuke Sasaki
2016-06-16 21:30:42 +09:00
parent ca5ef097ac
commit b4c4c213b1
4 changed files with 16 additions and 6 deletions

View File

@@ -16,6 +16,12 @@
#include <errno.h>
#include <pthread.h>
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <io.h>
#include <fcntl.h>
#define pipe(fds) _pipe(fds, 4096, _O_BINARY)
#endif // _MSC_VER || __MINGW32__
class Server {
public:
Server(int sock) : m_sock(sock) { }