wasi-common/yanix: fix FreeBSD support (#756)

* wasi-common/yanix: fix FreeBSD support

* yanix: add fadvise support on FreeBSD and NetBSD

* runtime,jit: use cfg(unix) instead of linux||macos
This commit is contained in:
myfreeweb
2020-02-09 17:44:48 +03:00
committed by GitHub
parent 2af544de8b
commit 699109658c
6 changed files with 59 additions and 16 deletions

View File

@@ -34,7 +34,7 @@ use wasmtime_environ::wasm::{
use wasmtime_environ::{DataInitializer, Module, TableElements, VMOffsets};
cfg_if::cfg_if! {
if #[cfg(any(target_os = "linux", target_os = "macos"))] {
if #[cfg(unix)] {
pub type SignalHandler = dyn Fn(libc::c_int, *const libc::siginfo_t, *const libc::c_void) -> bool;
impl InstanceHandle {