Don't include pthread.h nor semaphore.h with MA_NO_DEVICE_IO.

Public issue https://github.com/dr-soft/miniaudio/issues/138
This commit is contained in:
David Reid
2020-03-08 09:15:34 +10:00
parent c59ccbf5f8
commit 427f1f9930
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -1456,8 +1456,12 @@ extern "C" {
#endif #endif
#else #else
#define MA_POSIX #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 <pthread.h> /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */ #include <pthread.h> /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */
#include <semaphore.h> #include <semaphore.h>
#endif
#ifdef __unix__ #ifdef __unix__
#define MA_UNIX #define MA_UNIX
@@ -1,3 +1,4 @@
#define MA_NO_DEVICE_IO
#include "../test_common/ma_test_common.c" #include "../test_common/ma_test_common.c"
#include "ma_test_generation_noise.c" #include "ma_test_generation_noise.c"