From 2cd77a6a13c3b9b2d87ea9d7f5b60fce00cf67a2 Mon Sep 17 00:00:00 2001 From: Ahmed <43099566+ahmed-irfan@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:56:54 -0700 Subject: [PATCH] fix mingw timeout error (#461) * fix mingw timeout error * patch provided by Mark Mitchell --- src/utils/timeout.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/timeout.c b/src/utils/timeout.c index 80518f5bd..4e606de39 100644 --- a/src/utils/timeout.c +++ b/src/utils/timeout.c @@ -76,7 +76,7 @@ typedef struct timeout_s { timeout_state_t state; timeout_handler_t handler; void *param; -#ifdef THREAD_SAFE +#if !defined(MINGW) && defined(THREAD_SAFE) struct timespec ts; pthread_t thread; pthread_mutex_t mutex; @@ -84,7 +84,8 @@ typedef struct timeout_s { #endif } timeout_t; -#ifndef THREAD_SAFE + +#if !defined(THREAD_SAFE) || defined(MINGW) /* * Global structure common to both implementation. @@ -93,6 +94,7 @@ static timeout_t the_timeout; #endif + #ifndef MINGW