Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node): implement libuv APIs needed to support npm:sqlite3 #25893

Merged
merged 17 commits into from
Oct 2, 2024
Prev Previous commit
Next Next commit
Inline
  • Loading branch information
nathanwhit committed Sep 21, 2024
commit 89d169460b68769d59bf07900d89fe874c1680b7
14 changes: 5 additions & 9 deletions cli/napi/js_native_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3618,14 +3618,6 @@ mod uv {
use std::mem::MaybeUninit;
use std::ptr::addr_of_mut;

fn cvt(res: c_int) -> c_int {
if libc::EDOM > 0 {
res
} else {
-res
}
}

fn assert_ok(res: c_int) -> c_int {
if res != 0 {
eprintln!("bad result: {res}");
Expand Down Expand Up @@ -3660,7 +3652,11 @@ mod uv {
));
let err = libc::pthread_mutex_init(lock, attr_ptr);
assert_ok(libc::pthread_mutexattr_destroy(attr_ptr));
cvt(err)
if libc::EDOM > 0 {
err
} else {
-err
}
}
}

Expand Down