shithub: opus

Download patch

ref: b69bfb2a30df65e7f267dd6998276fa3986bd14b
parent: b816d1da6844396092bc9c2d2969bef35ae32d8f
author: Ralph Giles <giles@thaumas.net>
date: Sat Jun 13 20:53:30 EDT 2020

Fix arm build with rtcd enabled.

The autotools build doesn't set OPUS_HAVE_RTCD for arm targets,
assuming all the supported intrinsics will work on the runtime
cpu.

The cmake build however defines this by default when the neon
extension is available on the target. On Linux, the runtime
cpu detection reads /proc/cpuinfo, so removing stdio.h from
celt/os_support.h meant that the cmake build for arm targets
failed.

We don't currently have ci runs for that configuration, so
this only became apparent through manual testing.

Signed-off-by: Marcus Asteborg <maastebo@microsoft.com>
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>

--- a/celt/arm/armcpu.c
+++ b/celt/arm/armcpu.c
@@ -93,6 +93,8 @@
 
 #elif defined(__linux__)
 /* Linux based */
+#include <stdio.h>
+
 opus_uint32 opus_cpu_capabilities(void)
 {
   opus_uint32 flags = 0;