Skip to content

Commit f2ce8e0

Browse files
legendecasruyadorno
authored andcommitted
test: define NAPI_VERSION before including node_api.h
Include node.h first to define NAPI_VERSION that node binary is built with. The node.h should also be included first in embedder's use case since it is the primary header file. PR-URL: #48376 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 13ac0a5 commit f2ce8e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/cctest/test_linked_binding.cc

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Include node.h first to define NAPI_VERSION built with the
2+
// binary.
3+
// The node.h should also be included first in embedder's use case.
4+
#include "node.h"
15
#include "node_api.h"
26
#include "node_test_fixture.h"
37

0 commit comments

Comments
 (0)