opusdec: avoid __STDC_VERSION__ warning.
authorAndre Noll <maan@systemlinux.org>
Fri, 12 Jul 2013 14:08:41 +0000 (16:08 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 13 Jul 2013 17:56:00 +0000 (19:56 +0200)
opusdec_filter.c indirectly includes opus_types.h which checks whether
__STDC_VERSION__ >= 199901L. However, at least some gcc versions
don't define __STDC_VERSION__ which results in

warning: "__STDC_VERSION__" is not defined

For example, this happens on Ubuntu lucid, which ships gcc-4.4.3.

This patch gets rid of the warning by defining __STDC_VERSION__
if necessary prior to including the opus_types header.

opusdec_filter.c

index 482108a6c98df3e7f4891ea52fa81f3405353064..9a767d72bdf415f55acb946545ac96e1576da5d5 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+
+/* Silence gcc warning caused by including opus.h */
+#if !defined(__STDC_VERSION__)
+#define __STDC_VERSION__ 0
+#endif
+
 #include <regex.h>
 #include <opus/opus.h>
 #include <opus/opus_multistream.h>