From d0adbc05654eca27384b6496cfd8a22ed4dfb4fb Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 14 Jan 2020 10:20:12 +0300 Subject: [PATCH] test: fix compilation without thread support (EVENT__DISABLE_THREAD_SUPPORT=ON) --- test/regress_thread.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/regress_thread.h b/test/regress_thread.h index 21a62a4d..ef8943e3 100644 --- a/test/regress_thread.h +++ b/test/regress_thread.h @@ -29,7 +29,7 @@ #include "regress.h" -#ifdef EVENT__HAVE_PTHREADS +#ifdef EVENT__HAVE_PTHREADS /** PTHREADS */ #include #define THREAD_T pthread_t #define THREAD_FN void * @@ -40,7 +40,7 @@ thread_setup(threadvar); \ } while (0) #define THREAD_JOIN(th) pthread_join(th, NULL) -#else +#elif defined(_WIN32) /** _WIN32 */ #define THREAD_T HANDLE #define THREAD_FN unsigned __stdcall #define THREAD_RETURN() return (0) @@ -51,8 +51,10 @@ thread_setup(threadvar); \ } while (0) #define THREAD_JOIN(th) WaitForSingleObject(th, INFINITE) -#endif +#endif /* \!_WIN32 */ +#ifndef EVENT__DISABLE_THREAD_SUPPORT void thread_setup(THREAD_T pthread); +#endif #endif -- 2.40.0