diff --git a/test-libz-rs-sys/examples/compress.rs b/test-libz-rs-sys/examples/compress.rs index 75a2596..0471870 100644 --- a/test-libz-rs-sys/examples/compress.rs +++ b/test-libz-rs-sys/examples/compress.rs @@ -5,7 +5,9 @@ use std::{collections::hash_map::DefaultHasher, env::temp_dir, hash::Hash}; // we use the libz_sys but configure zlib-ng in zlib compat mode use libz_sys as libz_ng_sys; -use zlib_rs::{deflate::DeflateConfig, DeflateFlush, ReturnCode}; +#[cfg(not(target_family = "wasm"))] +use zlib_rs::deflate::DeflateConfig; +use zlib_rs::{DeflateFlush, ReturnCode}; use std::ffi::{c_int, c_uint}; diff --git a/zlib-rs/src/allocate.rs b/zlib-rs/src/allocate.rs index e4c8def..b1d2f22 100644 --- a/zlib-rs/src/allocate.rs +++ b/zlib-rs/src/allocate.rs @@ -1,3 +1,4 @@ +#[cfg(unix)] use core::ffi::c_int; use core::{ alloc::Layout,