aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2019-01-22 18:52:42 +0100
committerAndre Weissflog <floooh@gmail.com>2019-01-22 18:52:42 +0100
commitec98fefcafdc850f6b7e2b2c8ba453470e370830 (patch)
treef4410ceb7d372a6d804f4392db433310d8adec2a
parentcd8f5c3763c7e3ef2418e7d30a8d3be1aaadbcae (diff)
sokol_app.h, sokol_audio.h: exclude emscripten when detecting __unix__
-rw-r--r--sokol_app.h2
-rw-r--r--sokol_audio.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/sokol_app.h b/sokol_app.h
index 9e88fa40..458c1bac 100644
--- a/sokol_app.h
+++ b/sokol_app.h
@@ -3875,7 +3875,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
#endif /* WINDOWS */
/*== LINUX ==================================================================*/
-#if defined(__linux__) || defined(__unix__)
+#if (defined(__linux__) || defined(__unix__)) && !defined(__EMSCRIPTEN__)
#define GL_GLEXT_PROTOTYPES
#include <X11/X.h>
#include <X11/Xlib.h>
diff --git a/sokol_audio.h b/sokol_audio.h
index 2d76283b..351fc586 100644
--- a/sokol_audio.h
+++ b/sokol_audio.h
@@ -429,7 +429,7 @@ SOKOL_API_DECL int saudio_push(const float* frames, int num_frames);
#define _SAUDIO_RING_MAX_SLOTS (128)
/*--- mutex wrappers ---------------------------------------------------------*/
-#if defined(__APPLE__) || defined(__linux__) || defined(__unix__)
+#if (defined(__APPLE__) || defined(__linux__) || defined(__unix__)) && !defined(__EMSCRIPTEN__)
#include "pthread.h"
static pthread_mutex_t _saudio_mutex;
@@ -760,7 +760,7 @@ _SOKOL_PRIVATE void _saudio_backend_shutdown(void) {
}
/*=== ALSA BACKEND ===========================================================*/
-#elif defined(__linux__) || defined(__unix__)
+#elif (defined(__linux__) || defined(__unix__)) && !defined(__EMSCRIPTEN__)
#define ALSA_PCM_NEW_HW_PARAMS_API
#include <alsa/asoundlib.h>