shithub: opus

Download patch

ref: 1f8cea2d13b21e55518e55c15ec6bd9510164696
parent: a31e9fd24cd501d90dfdba1192a6dd6cb46ab2aa
author: Carlos Alberto Lopez Perez <[email protected]>
date: Mon Apr 10 21:07:35 EDT 2017

Avoid warning when __STDC_VERSION__ is not defined

This fixes an issue with gcc 4.9 on Debian 8, at least,
which defines __STDC__ but not __STDC_VERSION__, unlike
more recent gcc.

Signed-off-by: Ralph Giles <[email protected]>

--- a/include/opus_types.h
+++ b/include/opus_types.h
@@ -34,7 +34,7 @@
 #define OPUS_TYPES_H
 
 /* Use the real stdint.h if it's there (taken from Paul Hsieh's pstdint.h) */
-#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H))
+#if (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H))
 #include <stdint.h>
 
    typedef int16_t opus_int16;