Skip to content

Commit

Permalink
fix mingw timeout error (#461)
Browse files Browse the repository at this point in the history
* fix mingw timeout error

* patch provided by Mark Mitchell
  • Loading branch information
ahmed-irfan authored Oct 4, 2023
1 parent 3903130 commit 2cd77a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,16 @@ 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;
pthread_cond_t cond;
#endif
} timeout_t;

#ifndef THREAD_SAFE

#if !defined(THREAD_SAFE) || defined(MINGW)

/*
* Global structure common to both implementation.
Expand All @@ -93,6 +94,7 @@ static timeout_t the_timeout;

#endif


#ifndef MINGW


Expand Down

0 comments on commit 2cd77a6

Please sign in to comment.