Fix wxSocket code compilation with Cygwin in 64 bits
Use __ms_u_long instead of just u_long with Cygwin to avoid mismatch between (64 bit) Cygwin long and (still 32 bit, even in 64 bit build) Windows API long.
This commit is contained in:
@@ -23,6 +23,15 @@
|
||||
|
||||
#if defined(__CYGWIN__)
|
||||
#include <winsock.h>
|
||||
#ifdef __LP64__
|
||||
// We can't use long in this case because it is 64 bits with Cygwin, so
|
||||
// use their special type used for working around this instead.
|
||||
#define wxIoctlSocketArg_t __ms_u_long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef wxIoctlSocketArg_t
|
||||
#define wxIoctlSocketArg_t u_long
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -61,7 +70,7 @@ private:
|
||||
// just useless) as they would be dispatched by the main thread
|
||||
// while this blocking socket can be used from a worker one, so it
|
||||
// would result in data races and other unpleasantness.
|
||||
unsigned long trueArg = 1;
|
||||
wxIoctlSocketArg_t trueArg = 1;
|
||||
ioctlsocket(m_fd, FIONBIO, &trueArg);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user