shithub: opus

Download patch

ref: 918a09a344fde1eb28e0f8475fa84133691b01b1
parent: 50407983f2f785adf55a16797e1d42741dc1295b
author: Timothy B. Terriberry <territim@amazon.com>
date: Sat Jul 2 11:13:10 EDT 2022

Update x86 CPU detection configure check.

Commit 6577534a80c8 switched from using __get_cpuid() to
 __get_cpuid_count(), but the corresponding configure check was not
 updated.
Since __get_cpuid_count() was introduced much later, make sure we
 check for the function we actually use.

Thanks to Mark Harris for the report.

--- a/configure.ac
+++ b/configure.ac
@@ -724,7 +724,7 @@
                  unsigned int CPUInfo2;
                  unsigned int CPUInfo3;
                  unsigned int InfoType;
-                 __get_cpuid(InfoType, &CPUInfo0, &CPUInfo1, &CPUInfo2, &CPUInfo3);
+                 __get_cpuid_count(InfoType, 0, &CPUInfo0, &CPUInfo1, &CPUInfo2, &CPUInfo3);
             ]])],
             [AC_MSG_RESULT([C method])
                  AC_DEFINE([CPU_INFO_BY_C], [1], [Get CPU Info by c method])],