Skip to content

Commit fdd07d4

Browse files
authored
Merge pull request #94 from tbu-/pr_wasm_static
Fix static wasm build without wasi
2 parents 93abccb + c200d28 commit fdd07d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ pub type voidpf = *mut c_void;
2121
pub enum gzFile_s {}
2222
pub enum internal_state {}
2323

24-
#[cfg(feature = "libc")]
24+
#[cfg(all(feature = "libc", not(all(target_family = "wasm", target_os = "unknown"))))]
2525
pub type z_off_t = libc::off_t;
2626

27+
#[cfg(all(feature = "libc", all(target_family = "wasm", target_os = "unknown")))]
28+
pub type z_off_t = c_long;
29+
2730
#[repr(C)]
2831
#[derive(Copy, Clone)]
2932
pub struct gz_header {

0 commit comments

Comments
 (0)