From c4f9a6e83e0997d3b7575658ecf455e9a5246599 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Thu, 25 Aug 2022 18:08:10 +0530 Subject: [PATCH 1/2] 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 --- src/node_http2.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node_http2.h b/src/node_http2.h index 5bd715da8a2697..6f3b93943b90e5 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -5,6 +5,9 @@ // FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows #include +// clang-format off +#include "node.h" // nghttp2.h needs ssize_t +// clang-format on #include "nghttp2/nghttp2.h" #include "env.h" From a6573ba761baf23de4a4405b963da5a79993105e Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Fri, 26 Aug 2022 15:40:31 +0530 Subject: [PATCH 2/2] src: resolve stdint.h FIXME Co-authored-by: Anna Henningsen --- src/node_http2.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/node_http2.h b/src/node_http2.h index 6f3b93943b90e5..fea51d2d7f3b28 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -3,8 +3,6 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -// FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows -#include // clang-format off #include "node.h" // nghttp2.h needs ssize_t // clang-format on