From 7208dacd7d109bea43aab1db834243e4c52ad6d9 Mon Sep 17 00:00:00 2001 From: Ratzzo Date: Mon, 23 Jul 2018 19:10:03 -0500 Subject: [PATCH] Force the bundled http-parser if cross compiling (#337) --- libgit2-sys/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgit2-sys/build.rs b/libgit2-sys/build.rs index 1e92dbcdc6..b06ecfd894 100644 --- a/libgit2-sys/build.rs +++ b/libgit2-sys/build.rs @@ -120,6 +120,11 @@ fn main() { cfg.define("CURL", "OFF"); } + //Use bundled http-parser if cross compiling + if host != target { + cfg.define("USE_EXT_HTTP_PARSER", "OFF"); + } + let _ = fs::remove_dir_all(env::var("OUT_DIR").unwrap()); t!(fs::create_dir_all(env::var("OUT_DIR").unwrap()));