test: fix building with --disable-thread-support under win32

This commit is contained in:
Azat Khuzhin 2016-08-07 23:14:01 +03:00
parent 38716c653d
commit a487706e10
3 changed files with 6 additions and 0 deletions

View File

@ -138,7 +138,9 @@ main(int argc, char **argv)
#ifdef _WIN32
case 'i':
use_iocp = 1;
#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
evthread_use_windows_threads();
#endif
event_config_set_flag(cfg,EVENT_BASE_FLAG_STARTUP_IOCP);
break;
#endif

View File

@ -15,7 +15,9 @@ int main (int argc, char **argv)
int i, j;
const char *s1, *s2;
#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
evthread_use_windows_threads ();
#endif
s1 = evutil_socket_error_to_string (WSAEINTR);

View File

@ -279,7 +279,9 @@ test_ratelimiting(void)
#ifdef _WIN32
if (cfg_enable_iocp) {
#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
evthread_use_windows_threads();
#endif
event_config_set_flag(base_cfg, EVENT_BASE_FLAG_STARTUP_IOCP);
}
#endif