From 0b3b1ec5d888d9b658d9d2750f82cdcc7e14cb68 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 3 Mar 2023 14:18:53 +0900 Subject: [PATCH] Clang has __popcnt for ARM When binding on Windows with clang for ARM targets, `__popcnt` is defined. --- lib/nghttp3_ringbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp3_ringbuf.c b/lib/nghttp3_ringbuf.c index 75ef7ad..5e7775f 100644 --- a/lib/nghttp3_ringbuf.c +++ b/lib/nghttp3_ringbuf.c @@ -33,7 +33,7 @@ #include "nghttp3_macro.h" -#if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) +#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)) unsigned int __popcnt(unsigned int x) { unsigned int c = 0; for (; x; ++c) {