diff --git a/ixwebsocket/IXNetSystem.h b/ixwebsocket/IXNetSystem.h index d4e2abac..86fec3b5 100644 --- a/ixwebsocket/IXNetSystem.h +++ b/ixwebsocket/IXNetSystem.h @@ -27,6 +27,8 @@ struct pollfd { #define POLLIN 0x001 /* There is data to read. */ #define POLLOUT 0x004 /* Writing now will not block. */ #define POLLERR 0x008 /* Error condition. */ +#define POLLHUP 0x010 /* Hung up. */ +#define POLLNVAL 0x020 /* Invalid polling request. */ #endif #else diff --git a/ixwebsocket/IXSetThreadName.cpp b/ixwebsocket/IXSetThreadName.cpp index a1aa0272..cf746127 100644 --- a/ixwebsocket/IXSetThreadName.cpp +++ b/ixwebsocket/IXSetThreadName.cpp @@ -43,12 +43,16 @@ namespace ix info.dwThreadID = dwThreadID; info.dwFlags = 0; +#ifndef __GNUC__ __try { +#endif RaiseException( MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR*) &info); } +#ifndef __GNUC__ __except (EXCEPTION_EXECUTE_HANDLER) +#endif { } }