From 406f8fa6f4717c128243ddd580ebd356b2caa896 Mon Sep 17 00:00:00 2001
From: urielch <uriel.chemouni@gmail.com>
Date: Fri, 6 Sep 2024 12:09:01 +0200
Subject: [PATCH] the original C code do not compile with the current node
 binary.

---
 src/5-async-work/async_work_thread_safe_function/napi/binding.c | 2 +-
 .../thread_safe_function_round_trip/napi/round_trip.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/5-async-work/async_work_thread_safe_function/napi/binding.c b/src/5-async-work/async_work_thread_safe_function/napi/binding.c
index 16b26144..9c9289fe 100644
--- a/src/5-async-work/async_work_thread_safe_function/napi/binding.c
+++ b/src/5-async-work/async_work_thread_safe_function/napi/binding.c
@@ -186,7 +186,7 @@ static napi_value StartThread(napi_env env, napi_callback_info info) {
 }
 
 // Free the per-addon-instance data.
-static void addon_getting_unloaded(napi_env env, void* data, void* hint) {
+static void addon_getting_unloaded(const struct napi_env__ *env, void* data, void* hint) {
   AddonData* addon_data = (AddonData*)data;
   assert(addon_data->work == NULL &&
       "No work item in progress at module unload");
diff --git a/src/6-threadsafe-function/thread_safe_function_round_trip/napi/round_trip.c b/src/6-threadsafe-function/thread_safe_function_round_trip/napi/round_trip.c
index 0da43e37..be59e3ad 100644
--- a/src/6-threadsafe-function/thread_safe_function_round_trip/napi/round_trip.c
+++ b/src/6-threadsafe-function/thread_safe_function_round_trip/napi/round_trip.c
@@ -342,7 +342,7 @@ static napi_value GetPrime(napi_env env, napi_callback_info info) {
   return prime_property;
 }
 
-static void addon_is_unloading(napi_env env, void* data, void* hint) {
+static void addon_is_unloading(const struct napi_env__ *env, void* data, void* hint) {
   AddonData* addon_data = (AddonData*)data;
   uv_mutex_destroy(&(addon_data->check_status_mutex));
   CHECK(napi_delete_reference(env,