2
0
Эх сурвалжийг харах

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.
darkerbit 2 жил өмнө
parent
commit
ac7287357b
1 өөрчлөгдсөн 1 нэмэгдсэн , 0 устгасан
  1. 1 0
      sokol_audio.h

+ 1 - 0
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