From 70b1a4f1961e4f31269faf0419fcf677b170440b Mon Sep 17 00:00:00 2001 From: toyobayashi Date: Fri, 21 Jun 2024 15:31:11 +0800 Subject: [PATCH] fix --- packages/emnapi/include/node/uv.h | 4 +++- packages/emnapi/src/threadsafe_function.c | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/emnapi/include/node/uv.h b/packages/emnapi/include/node/uv.h index 677905d2..3be4c4ff 100644 --- a/packages/emnapi/include/node/uv.h +++ b/packages/emnapi/include/node/uv.h @@ -8,7 +8,7 @@ extern "C" { #endif #include -#include "uv/unix.h" +#include /* Internal type, do not use. */ struct uv__queue { @@ -16,6 +16,8 @@ struct uv__queue { struct uv__queue* prev; }; +#include "uv/unix.h" + #define UV_EXTERN /* nothing */ typedef enum { diff --git a/packages/emnapi/src/threadsafe_function.c b/packages/emnapi/src/threadsafe_function.c index 360289a4..692471d8 100644 --- a/packages/emnapi/src/threadsafe_function.c +++ b/packages/emnapi/src/threadsafe_function.c @@ -5,9 +5,8 @@ #include #include #include -#include "uv/queue.h" - #include "uv.h" +#include "uv/queue.h" EXTERN_C_START @@ -21,7 +20,7 @@ static const unsigned int kMaxIterationCount = 1000; struct data_queue_node { void* data; - void* q[2]; + struct uv__queue q; }; struct napi_threadsafe_function__ {