Skip to content

Commit ebd09bd

Browse files
author
Gabriel Schulhof
committed
Fix build on versions between 8.0.0 and 8.6.0
There are conflicting definitions for node::async_id and node::async_context in Node.js 8.2. PR-URL: #209 Reviewed-By: Michael Dawson <[email protected]>
1 parent b9aaaf2 commit ebd09bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/node_internals.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ class CallbackScope {
7070

7171
namespace node {
7272

73-
#if NODE_MAJOR_VERSION < 8 || NODE_MAJOR_VERSION == 8 && NODE_MINOR_VERSION < 6
73+
#if NODE_MAJOR_VERSION < 8 || NODE_MAJOR_VERSION == 8 && NODE_MINOR_VERSION < 2
7474
typedef int async_id;
7575

7676
typedef struct async_context {
7777
node::async_id async_id;
7878
node::async_id trigger_async_id;
7979
} async_context;
80+
#endif // NODE_MAJOR_VERSION < 8.2
8081

82+
#if NODE_MAJOR_VERSION < 8 || NODE_MAJOR_VERSION == 8 && NODE_MINOR_VERSION < 6
8183
NODE_EXTERN async_context EmitAsyncInit(v8::Isolate* isolate,
8284
v8::Local<v8::Object> resource,
8385
v8::Local<v8::String> name,

0 commit comments

Comments
 (0)