diff --git a/celt/stack_alloc.h b/celt/stack_alloc.h index 68569e2b1256a48633585009eef28a677f1e1f62..a6f06d2263afcf146bf7c5d6c15f39d32f6ba60e 100644 --- a/celt/stack_alloc.h +++ b/celt/stack_alloc.h @@ -32,6 +32,10 @@ #ifndef STACK_ALLOC_H #define STACK_ALLOC_H +#if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK)) +#error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode." +#endif + #ifdef USE_ALLOCA # ifdef WIN32 # include <malloc.h> diff --git a/src/opus_decoder.c b/src/opus_decoder.c index 204ed037d1020b6d4ed7fbb2910d60ff7acdba56..e7941f160cd039d0a38ba224e076c02fae0aed35 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -29,6 +29,10 @@ #include "config.h" #endif +#ifndef OPUS_BUILD +#error "OPUS_BUILD _MUST_ be defined to build Opus and you probably want a decent config.h, see README for more details." +#endif + #include <stdarg.h> #include "celt.h" #include "opus.h"