Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarshan Sen <raisinten@gmail.com>2022-08-29 12:58:53 +0300
committerGitHub <noreply@github.com>2022-08-29 12:58:53 +0300
commit72aafbdba74d9d353f9b2d43df4072d4d061fb3f (patch)
tree282e098cf13fddfcf6cd1213b55a354d44063c86 /src
parentd40a62201671f8232d00e234dc274041af56b8e6 (diff)
src: fix ssize_t error from nghttp2.h
The "node_http2.h" include reordering enforced by clang-format broke Electron's Node.js upgrade on Windows. ssize_t is a part of the POSIX standard and it's not available on Windows, so the fix for this is to include "node.h" which typedefs it on Windows in https://github.com/nodejs/node/blob/bb4dff783ddb3b20c67041f7ccef796c335c2407/src/node.h#L212-L220. Refs: https://github.com/electron/electron/pull/35350#discussion_r954890551 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: https://github.com/nodejs/node/pull/44393 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_http2.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node_http2.h b/src/node_http2.h
index 5bd715da8a2..fea51d2d7f3 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -3,8 +3,9 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
-// FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows
-#include <cstdint>
+// clang-format off
+#include "node.h" // nghttp2.h needs ssize_t
+// clang-format on
#include "nghttp2/nghttp2.h"
#include "env.h"