From aa625189bbe7b5621648e1a8fdd195bb31629363 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 3 Mar 2023 16:06:02 +0900 Subject: [PATCH] deps: cherry-pick win/arm64/clang fix for ngtcp2 Refs: https://github.com/ngtcp2/nghttp3/pull/112 Refs: https://github.com/ngtcp2/ngtcp2/pull/692 --- deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c | 2 +- deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c b/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c index 9ea91c81c8a1b95..5e7775f1a5a5970 100644 --- a/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c +++ b/deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c @@ -33,7 +33,7 @@ #include "nghttp3_macro.h" -#if defined(_MSC_VER) && 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) { diff --git a/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c b/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c index a6b3f73e73339c0..74e488bce76f240 100644 --- a/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c +++ b/deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c @@ -31,7 +31,7 @@ #include "ngtcp2_macro.h" -#if defined(_MSC_VER) && 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) {