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 dc9bfcaCopy full SHA for dc9bfca
src/node_http2.h
@@ -3,6 +3,20 @@
3
4
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
5
6
+// nghttp2.h needs ssize_t to compile on Windows.
7
+// Refs: https://github.com/electron/electron/pull/35350#discussion_r954890551
8
+// Same as
9
+// https://github.com/nodejs/node/blob/bb4dff783ddb3b20c67041f7ccef796c335c2407/src/node.h#L212-L220.
10
+#ifdef _WIN32
11
+#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
12
+typedef intptr_t ssize_t;
13
+#define _SSIZE_T_
14
+#define _SSIZE_T_DEFINED
15
+#endif
16
+#else // !_WIN32
17
+#include <sys/types.h> // size_t, ssize_t
18
+#endif // _WIN32
19
+
20
// FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows
21
#include <cstdint>
22
#include "nghttp2/nghttp2.h"
0 commit comments