aboutsummaryrefslogtreecommitdiff
path: root/sokol_audio.h
diff options
context:
space:
mode:
authordarkerbit <mail.darkerbit@gmail.com>2023-02-16 18:33:12 +0200
committerGitHub <noreply@github.com>2023-02-16 18:33:12 +0200
commitac7287357b372c5da03a7e974abc2391638aa714 (patch)
treef18771724d437a6fe2b3423cdccbc8f78f1a96f8 /sokol_audio.h
parent154ac78f09bf0d8f382eb036da2ab91110cdaef0 (diff)
sokol_audio.h: Include alloca.h on Linux
Required by a snd_pcm_hw_params_alloca call in _saudio_alsa_backend_init. This change makes it so the implementation links correctly on Linux in -std=c99 mode, instead of relying on implicit alloca only provided by GNU extensions.
Diffstat (limited to 'sokol_audio.h')
-rw-r--r--sokol_audio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sokol_audio.h b/sokol_audio.h
index 5a42ecfb..bdd69530 100644
--- a/sokol_audio.h
+++ b/sokol_audio.h
@@ -780,6 +780,7 @@ inline void saudio_setup(const saudio_desc& desc) { return saudio_setup(&desc);
#include "aaudio/AAudio.h"
#endif
#elif defined(_SAUDIO_LINUX)
+ #include <alloca.h>
#define _SAUDIO_PTHREADS (1)
#include <pthread.h>
#define ALSA_PCM_NEW_HW_PARAMS_API