Skip to content

Commit c18520b

Browse files
committed
Fix build as part of rust
1 parent cd740a9 commit c18520b

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/wasi.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,27 +1855,20 @@ extern "C" {
18551855
sig: ::c_int,
18561856
sa: *const sigaction,
18571857
old: *mut sigaction,
1858-
_external_handler: ::Option<unsafe extern "C" fn(::c_int)>
1858+
_external_handler: ::Option<unsafe extern "C" fn(::c_int)>,
18591859
) -> ::c_int;
18601860
#[cfg(target_vendor = "wasmer")]
18611861
fn __wasm_signal(signum: ::c_int);
18621862
}
18631863

18641864
#[cfg(target_vendor = "wasmer")]
1865-
pub unsafe fn sigaction(
1866-
sig: ::c_int,
1867-
sa: *const sigaction,
1868-
old: *mut sigaction,
1869-
) -> ::c_int {
1870-
sigaction_external_default(sig, sa, old, Some(default_handler))
1865+
pub unsafe fn sigaction(sig: ::c_int, sa: *const sigaction, old: *mut sigaction) -> ::c_int {
1866+
sigaction_external_default(sig, sa, old, ::Option::Some(default_handler))
18711867
}
18721868

18731869
#[cfg(target_vendor = "wasmer")]
18741870
extern "C" fn default_handler(sig: ::c_int) {
1875-
if sig == SIGCHLD
1876-
|| sig == SIGURG
1877-
|| sig == SIGWINCH
1878-
|| sig == SIGCONT {
1871+
if sig == SIGCHLD || sig == SIGURG || sig == SIGWINCH || sig == SIGCONT {
18791872
return;
18801873
} else {
18811874
unsafe { abort() };

0 commit comments

Comments
 (0)