fix compile error on arm

This commit is contained in:
hnwyllmm
2024-01-03 11:22:50 +00:00
committed by ob-robot
parent e5818bc741
commit ebac2a6e42

View File

@ -12,7 +12,9 @@
#include "zlib_lite_adaptor.h" #include "zlib_lite_adaptor.h"
#if defined(__x86_64__)
#include <cpuid.h> #include <cpuid.h>
#endif
#include "codec_deflate_qpl.h" #include "codec_deflate_qpl.h"
#include "zlib_lite_src/deflate.h" #include "zlib_lite_src/deflate.h"
@ -25,9 +27,11 @@ namespace common
namespace ZLIB_LITE namespace ZLIB_LITE
{ {
static bool check_support_qpl(void) static bool check_support_qpl(void)
{ {
bool bret = false; bool bret = false;
#if defined(__x86_64__)
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
//LEVEL=0: Highest Function Parameter and Manufacturer ID //LEVEL=0: Highest Function Parameter and Manufacturer ID
__cpuid(0, eax, ebx, ecx, edx); __cpuid(0, eax, ebx, ecx, edx);
@ -62,6 +66,7 @@ static bool check_support_qpl(void)
} }
} }
#endif // __x86_64__
return bret; return bret;
} }