Skip to content

Commit c4f9a6e

Browse files
committed
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: electron/electron#35350 (comment) Signed-off-by: Darshan Sen <raisinten@gmail.com>
1 parent 937520a commit c4f9a6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/node_http2.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
// FIXME(joyeecheung): nghttp2.h needs stdint.h to compile on Windows
77
#include <cstdint>
8+
// clang-format off
9+
#include "node.h" // nghttp2.h needs ssize_t
10+
// clang-format on
811
#include "nghttp2/nghttp2.h"
912

1013
#include "env.h"

0 commit comments

Comments
 (0)