Skip to content

Commit

Permalink
NoMallocThreadPool: include pthread if using pthread
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 committed Aug 24, 2024
1 parent efb49f4 commit ee9ac3e
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 ee9ac3e

Please sign in to comment.