Merge pull request #1423 from Neumann-A/patch-1

Fix windows arm builds
This commit is contained in:
Even Rouault 2022-05-16 23:35:22 +02:00 committed by GitHub
commit 5292728740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ static OPJ_BOOL only_cleanup_pass_is_decoded = OPJ_FALSE;
static INLINE static INLINE
OPJ_UINT32 population_count(OPJ_UINT32 val) OPJ_UINT32 population_count(OPJ_UINT32 val)
{ {
#ifdef OPJ_COMPILER_MSVC #if defined(OPJ_COMPILER_MSVC) && (defined(_M_IX86) || defined(_M_AMD64))
return (OPJ_UINT32)__popcnt(val); return (OPJ_UINT32)__popcnt(val);
#elif (defined OPJ_COMPILER_GNUC) #elif (defined OPJ_COMPILER_GNUC)
return (OPJ_UINT32)__builtin_popcount(val); return (OPJ_UINT32)__builtin_popcount(val);