We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 937520a commit 742efa6Copy full SHA for 742efa6
src/node_http2.h
@@ -5,6 +5,21 @@
5
6
// FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows
7
#include <cstdint>
8
+
9
+// nghttp2.h needs ssize_t to compile on Windows.
10
+// Refs: https://github.com/electron/electron/pull/35350#discussion_r954890551
11
+// Same as
12
+// https://github.com/nodejs/node/blob/bb4dff783ddb3b20c67041f7ccef796c335c2407/src/node.h#L212-L220.
13
+#ifdef _WIN32
14
+#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
15
+typedef intptr_t ssize_t;
16
+#define _SSIZE_T_
17
+#define _SSIZE_T_DEFINED
18
+#endif
19
+#else // !_WIN32
20
+#include <sys/types.h> // size_t, ssize_t
21
+#endif // _WIN32
22
23
#include "nghttp2/nghttp2.h"
24
25
#include "env.h"
0 commit comments