Skip to content

Commit

Permalink
Fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Jan 17, 2024
1 parent fde0589 commit 1eacea4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions build_zng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,13 @@ pub fn build_zlib_ng(target: &str, compat: bool) {

let msvc = target.ends_with("pc-windows-msvc");

cfg.std("c11");

// This can be made configurable if it is an issue but most of these would
// only fail if the user was on a decade old+ libc impl
if !msvc {
cfg.std("c11")
.define("HAVE_ALIGNED_ALLOC", None)
cfg.define("HAVE_ALIGNED_ALLOC", None)
.define("HAVE_ATTRIBUTE_ALIGNED", None)
.define("HAVE_BUILTIN_CTZ", None)
.define("HAVE_BUILTIN_CTZLL", None)
.define("HAVE_POSIX_MEMALIGN", None)
Expand All @@ -327,9 +329,6 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
cfg.define("_XOPEN_SOURCE", "700");
}

// GCC/clang have had this for who knows how long
cfg.define("HAVE_ATTRIBUTE_ALIGNED", None);

if target.contains("s390x") {
// Enable hardware compression on s390x.
cfg.file("src/zlib-ng/arch/s390/dfltcc_deflate.c")
Expand Down

0 comments on commit 1eacea4

Please sign in to comment.