From 407ce3fdcb17eee98fc4f22f5dbddd7302a6d055 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Sun, 25 Jun 2023 01:04:08 +0800 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/48376 Reviewed-By: Luigi Pinca Reviewed-By: Michael Dawson --- test/cctest/test_linked_binding.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/cctest/test_linked_binding.cc b/test/cctest/test_linked_binding.cc index 6f2efda77268c5..6b934608cc0853 100644 --- a/test/cctest/test_linked_binding.cc +++ b/test/cctest/test_linked_binding.cc @@ -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"