Skip to content

Commit

Permalink
build,win: float VS 17.11 compilation patch
Browse files Browse the repository at this point in the history
Fixes: nodejs#54898
PR-URL: nodejs#54970
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
# Conflicts:
#	deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
#	deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
  • Loading branch information
vmoroz committed Nov 20, 2024
1 parent f55c0de commit ff0eff5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@

#include "nghttp3_macro.h"

#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
#if defined(_MSC_VER) && _MSC_VER < 1941 && !defined(__clang__) && \
(defined(_M_ARM) || defined(_M_ARM64))
unsigned int __popcnt(unsigned int x) {
unsigned int c = 0;
for (; x; ++c) {
Expand Down
5 changes: 3 additions & 2 deletions deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

#include "ngtcp2_macro.h"

#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
unsigned int __popcnt(unsigned int x) {
#if defined(_MSC_VER) && _MSC_VER < 1941 && !defined(__clang__) && \
(defined(_M_ARM) || defined(_M_ARM64))
static unsigned int __popcnt(unsigned int x) {
unsigned int c = 0;
for (; x; ++c) {
x &= x - 1;
Expand Down

0 comments on commit ff0eff5

Please sign in to comment.