summaryrefslogtreecommitdiff
path: root/test_napi/src/object_wrap.rs
diff options
context:
space:
mode:
authorLuke Channings <461449+LukeChannings@users.noreply.github.com>2022-10-10 03:29:31 +0100
committerGitHub <noreply@github.com>2022-10-10 07:59:31 +0530
commita2488ae79200abfcbad0f0f8b084a3ff8e183880 (patch)
tree23a0e5138e0de596834b71a65795a0ffb5ddcfa2 /test_napi/src/object_wrap.rs
parent3b6b75bb46840a897a310dfd3fcbbd05618f3c5b (diff)
fix(npm): support compiling on linux/aarch64 (#16208)
Changes introduced in #13633 have broken the ability to compile for linux/aarch64 - specifically the use of a `i8` as a char type, which is an `u8` on linux/aarch64. This PR: - Replaces instances of `i8` with the architecture-aware wrapper type `c_char` - Skips the use of `--export-dynamic-symbol` on linux-aarch64, because the target environments often rely on older libc/binutils versions
Diffstat (limited to 'test_napi/src/object_wrap.rs')
-rw-r--r--test_napi/src/object_wrap.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test_napi/src/object_wrap.rs b/test_napi/src/object_wrap.rs
index 3b849b2dc..a38f97c9c 100644
--- a/test_napi/src/object_wrap.rs
+++ b/test_napi/src/object_wrap.rs
@@ -3,7 +3,7 @@
use napi_sys::Status::napi_ok;
use napi_sys::ValueType::napi_number;
use napi_sys::*;
-use std::os::raw::c_void;
+use std::os::raw::{c_char, c_void};
use std::ptr;
pub struct NapiObject {
@@ -146,7 +146,7 @@ pub fn init(env: napi_env, exports: napi_value) {
napi_set_named_property(
env,
exports,
- "NapiObject\0".as_ptr() as *const i8,
+ "NapiObject\0".as_ptr() as *const c_char,
cons,
)
} == napi_ok