Skip to content

Instantly share code, notes, and snippets.

@tiras-j
Created October 12, 2018 01:59
Show Gist options
  • Save tiras-j/756324de1f00bc5a20513930bfc7e357 to your computer and use it in GitHub Desktop.
Save tiras-j/756324de1f00bc5a20513930bfc7e357 to your computer and use it in GitHub Desktop.
libz-sys patch for iOS? Adding _C99_SOURCE define
diff --git a/build.rs b/build.rs
index c3ac6c6..76ffe9d 100644
--- a/build.rs
+++ b/build.rs
@@ -104,6 +104,7 @@ fn build_zlib(cfg: &mut cc::Build, target: &str) {
cfg.define("STDC", None);
cfg.define("_LARGEFILE64_SOURCE", None);
cfg.define("_POSIX_SOURCE", None);
+ cfg.define("_C99_SOURCE", None);
cfg.flag("-fvisibility=hidden");
}
if target.contains("solaris") {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment