23 lines
829 B
Diff
23 lines
829 B
Diff
From 098bb874db85c185e2e3598f735fece7552e6dca Mon Sep 17 00:00:00 2001
|
|
From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
|
|
Date: Mon, 16 May 2022 23:10:26 +0200
|
|
Subject: [PATCH] Fix windows arm builds
|
|
|
|
---
|
|
src/lib/openjp2/ht_dec.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/lib/openjp2/ht_dec.c b/src/lib/openjp2/ht_dec.c
|
|
index 1eb4d525f..e2f3afd6a 100644
|
|
--- a/src/lib/openjp2/ht_dec.c
|
|
+++ b/src/lib/openjp2/ht_dec.c
|
|
@@ -69,7 +69,7 @@ static OPJ_BOOL only_cleanup_pass_is_decoded = OPJ_FALSE;
|
|
static INLINE
|
|
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);
|
|
#elif (defined OPJ_COMPILER_GNUC)
|
|
return (OPJ_UINT32)__builtin_popcount(val);
|