Skip to content

Commit

Permalink
NoMallocThreadPool: include pthread if using pthread (#417)
Browse files Browse the repository at this point in the history
Using clang with libc++ does not include pthread.h implicitly through
<thread> by default, so using pthread_t will cause a compilation error.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
  • Loading branch information
1480c1 authored Sep 2, 2024
1 parent efb49f4 commit a1996a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/Lib/Utilities/NoMallocThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include <chrono>
#include <array>

#ifdef HAVE_PTHREADS
#include <pthread.h>
#endif

#include "CommonLib/CommonDef.h"
#if ENABLE_TIME_PROFILING_MT_MODE
#include "CommonLib/TimeProfiler.h"
Expand Down

0 comments on commit a1996a8

Please sign in to comment.