Skip to content

Commit

Permalink
test: define NAPI_VERSION before including node_api.h
Browse files Browse the repository at this point in the history
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: nodejs#48376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
legendecas authored and Ceres6 committed Aug 14, 2023
1 parent 5a21d8f commit abe8d1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/cctest/test_linked_binding.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Include node.h first to define NAPI_VERSION built with the
// binary.
// The node.h should also be included first in embedder's use case.
#include "node.h"
#include "node_api.h"
#include "node_test_fixture.h"

Expand Down

0 comments on commit abe8d1c

Please sign in to comment.