diff --git a/Cargo.toml b/Cargo.toml index e82d864..ddbea8a 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,7 +60,7 @@ binrw = { version = "0.14", features = ["std"], default-features = false } tracing = { version = "0.1", features = ["std"], default-features = false } # used for zlib compression in sqpack files -libz-ng-sys = { version = "1.1" } +libz-sys = { version = "1.1" } # nice to have features rust is lacking at the moment modular-bitfield = "0.11" diff --git a/build.rs b/build.rs index a72d081..13ce9f0 100644 --- a/build.rs +++ b/build.rs @@ -3,6 +3,6 @@ fn main() { // Windows doesn't ship pkgconfig files, typically. At least in our build system. - #[cfg(not(target_os = "windows"))] + #[cfg(all(not(target_os = "windows"), not(target_family = "wasm")))] system_deps::Config::new().probe().unwrap(); } diff --git a/src/compression.rs b/src/compression.rs index ed3bb88..f01482e 100755 --- a/src/compression.rs +++ b/src/compression.rs @@ -3,7 +3,7 @@ use std::ptr::null_mut; -use libz_ng_sys::*; +use libz_sys::*; // This module's functions are licensed under MIT from https://github.com/rust-lang/flate2-rs mod flate2_zallocation { diff --git a/src/crc.rs b/src/crc.rs index b50f767..bbfe5d7 100644 --- a/src/crc.rs +++ b/src/crc.rs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2023 Joshua Goins // SPDX-License-Identifier: GPL-3.0-or-later -use libz_ng_sys::z_off_t; +use libz_sys::z_off_t; use std::ops::{Add, AddAssign, BitXor, BitXorAssign}; /// CRC used for filepath hashes in index file @@ -45,11 +45,11 @@ impl Jamcrc { } fn crc32(crc: u32, s: &[u8]) -> u32 { - unsafe { libz_ng_sys::crc32(crc, s.as_ptr(), s.len() as u32) as u32 } + unsafe { libz_sys::crc32(crc.into(), s.as_ptr(), s.len() as u32) as u32 } } fn crc32_combine(crc1: u32, crc2: u32, len2: usize) -> u32 { - unsafe { libz_ng_sys::crc32_combine(crc1, crc2, len2 as z_off_t) as u32 } + unsafe { libz_sys::crc32_combine(crc1.into(), crc2.into(), len2 as z_off_t) as u32 } } /// CRC used for shader keys