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__ {