diff --git a/miniaudio.h b/miniaudio.h index 3e3acde8..1cab8c6c 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -1456,8 +1456,12 @@ extern "C" { #endif #else #define MA_POSIX + + /* We only use multi-threading with the device IO API, so no need to include these headers otherwise. */ +#if !defined(MA_NO_DEVICE_IO) #include /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */ #include +#endif #ifdef __unix__ #define MA_UNIX diff --git a/tests/test_generation/ma_test_generation.c b/tests/test_generation/ma_test_generation.c index 78babc99..7d16a225 100644 --- a/tests/test_generation/ma_test_generation.c +++ b/tests/test_generation/ma_test_generation.c @@ -1,3 +1,4 @@ +#define MA_NO_DEVICE_IO #include "../test_common/ma_test_common.c" #include "ma_test_generation_noise.c"