From 45e7ba447294e75299ca96184adfff315856a85d 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"