From ba7ebbb35cc00edb71ae1de7c035e31a1fd11401 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 5 Feb 2016 21:08:45 -0800 Subject: [PATCH] vp8: fix build with mingw+pthreads Change-Id: Icc34a00759c95b7b8ac356cdcc4adae848b61431 --- vp8/common/threading.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vp8/common/threading.h b/vp8/common/threading.h index a433d03a0..c00e517a7 100644 --- a/vp8/common/threading.h +++ b/vp8/common/threading.h @@ -12,6 +12,7 @@ #ifndef VP8_COMMON_THREADING_H_ #define VP8_COMMON_THREADING_H_ +#include "./vpx_config.h" #ifdef __cplusplus extern "C" { @@ -20,7 +21,7 @@ extern "C" { #if CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD /* Thread management macros */ -#ifdef _WIN32 +#if defined(_WIN32) && !HAVE_PTHREAD_H /* Win32 */ #include #include @@ -77,8 +78,8 @@ extern "C" { #define ts_key_create(ts_key, destructor) pthread_key_create (&(ts_key), destructor); #endif -/* Syncrhronization macros: Win32 and Pthreads */ -#ifdef _WIN32 +/* Synchronization macros: Win32 and Pthreads */ +#if defined(_WIN32) && !HAVE_PTHREAD_H #define sem_t HANDLE #define pause(voidpara) __asm PAUSE #define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL) -- 2.40.0