Commit 0f392b8b authored by thedmd's avatar thedmd Committed by David Reid

Compile cleanly on Switch.

parent 239a6138
...@@ -3836,6 +3836,9 @@ typedef ma_uint16 wchar_t; ...@@ -3836,6 +3836,9 @@ typedef ma_uint16 wchar_t;
#ifdef __EMSCRIPTEN__ #ifdef __EMSCRIPTEN__
#define MA_EMSCRIPTEN #define MA_EMSCRIPTEN
#endif #endif
#if defined(__NX__)
#define MA_NX
#endif
#endif #endif
...@@ -11220,6 +11223,10 @@ IMPLEMENTATION ...@@ -11220,6 +11223,10 @@ IMPLEMENTATION
#include <pthread.h> #include <pthread.h>
#endif #endif
#ifdef MA_NX
#include <time.h> /* For nanosleep() */
#endif
#include <sys/stat.h> /* For fstat(), etc. */ #include <sys/stat.h> /* For fstat(), etc. */
#ifdef MA_EMSCRIPTEN #ifdef MA_EMSCRIPTEN
...@@ -11631,7 +11638,7 @@ static void ma_sleep__posix(ma_uint32 milliseconds) ...@@ -11631,7 +11638,7 @@ static void ma_sleep__posix(ma_uint32 milliseconds)
(void)milliseconds; (void)milliseconds;
MA_ASSERT(MA_FALSE); /* The Emscripten build should never sleep. */ MA_ASSERT(MA_FALSE); /* The Emscripten build should never sleep. */
#else #else
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || defined(MA_NX)
struct timespec ts; struct timespec ts;
ts.tv_sec = milliseconds / 1000; ts.tv_sec = milliseconds / 1000;
ts.tv_nsec = milliseconds % 1000 * 1000000; ts.tv_nsec = milliseconds % 1000 * 1000000;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment