34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From a0d2c402d6d122132b10e65e667af0f93feec7d2 Mon Sep 17 00:00:00 2001
|
|
From: Alvin Wong <alvinhochun@gmail.com>
|
|
Date: Thu, 10 Mar 2022 16:25:34 +0800
|
|
Subject: [PATCH 11/17] Fix MinGW build
|
|
|
|
---
|
|
src/common/mathutil.h | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/common/mathutil.h b/src/common/mathutil.h
|
|
index 85243bc4a..1ac3b6b49 100644
|
|
--- a/src/common/mathutil.h
|
|
+++ b/src/common/mathutil.h
|
|
@@ -1106,7 +1106,7 @@ inline int BitCount(uint64_t bits)
|
|
# endif // defined(_M_IX86) || defined(_M_X64)
|
|
#endif // defined(_MSC_VER) && !defined(__clang__)
|
|
|
|
-#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
|
|
+#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__GNUC__)
|
|
inline int BitCount(uint32_t bits)
|
|
{
|
|
return __builtin_popcount(bits);
|
|
@@ -1116,7 +1116,7 @@ inline int BitCount(uint64_t bits)
|
|
{
|
|
return __builtin_popcountll(bits);
|
|
}
|
|
-#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
|
|
+#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__GNUC__)
|
|
|
|
inline int BitCount(uint8_t bits)
|
|
{
|
|
--
|
|
2.24.1.windows.2
|
|
|