mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 00:34:03 +02:00
Don't include pthread.h if threading is disabled.
This commit is contained in:
+6
-4
@@ -3874,6 +3874,7 @@ typedef ma_uint16 wchar_t;
|
|||||||
#if !defined(_WIN32) /* If it's not Win32, assume POSIX. */
|
#if !defined(_WIN32) /* If it's not Win32, assume POSIX. */
|
||||||
#define MA_POSIX
|
#define MA_POSIX
|
||||||
|
|
||||||
|
#if !defined(MA_NO_THREADING)
|
||||||
/*
|
/*
|
||||||
Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented.
|
Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented.
|
||||||
You can use this to avoid including pthread.h in the header section. The downside is that it
|
You can use this to avoid including pthread.h in the header section. The downside is that it
|
||||||
@@ -3891,6 +3892,7 @@ typedef ma_uint16 wchar_t;
|
|||||||
typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t;
|
typedef union ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t;
|
||||||
typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t;
|
typedef union ma_pthread_cond_t { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__unix__)
|
#if defined(__unix__)
|
||||||
#define MA_UNIX
|
#define MA_UNIX
|
||||||
@@ -11547,14 +11549,14 @@ IMPLEMENTATION
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MA_WIN32)
|
#if !defined(MA_WIN32)
|
||||||
|
#if !defined(MA_NO_THREADING)
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <sys/time.h> /* select() (used for ma_sleep()). */
|
#include <pthread.h> /* For pthreads. */
|
||||||
#include <unistd.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MA_NX
|
#include <sys/time.h> /* select() (used for ma_sleep()). */
|
||||||
#include <time.h> /* For nanosleep() */
|
#include <time.h> /* For nanosleep() */
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/stat.h> /* For fstat(), etc. */
|
#include <sys/stat.h> /* For fstat(), etc. */
|
||||||
|
|||||||
Reference in New Issue
Block a user