From d86ec94d65da815a8b90257620602b4c5ba00b09 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Wed, 7 Jun 2023 15:36:54 +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. --- 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"