Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: temporary fixup for ngtcp2 to build on windows
The ngtcp2 update uses a gcc builtin that is not available under
_MSC_VER. This floats a patch to fix it.

Upstream PR: ngtcp2/ngtcp2#247
  • Loading branch information
jasnell committed Jun 23, 2020
commit aed5f87e6ce1d766ebcb9acb1cfc7269e2bdc703
13 changes: 13 additions & 0 deletions deps/ngtcp2/lib/ngtcp2_cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@
#include "ngtcp2_mem.h"
#include "ngtcp2_rcvry.h"

#ifdef _MSC_VER
#include <intrin.h>
static inline int __builtin_clzll(unsigned long long x) {
#if defined(_WIN64) || defined(_LP64)
return (int)__lzcnt64(x);
#else
// TODO(@jasnell): Determine if there's an alternative available for x86
assert(0);
#endif

}
#endif

uint64_t ngtcp2_cc_compute_initcwnd(size_t max_udp_payload_size) {
uint64_t n = 2 * max_udp_payload_size;
n = ngtcp2_max(n, 14720);
Expand Down