From c1a91704745f4243809f82478ab943cb9f9d005f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 5 Jul 2022 00:07:48 -0500 Subject: hscript: Portability fixes for libc++ --- hscript/script.cc | 4 ++-- hscript/script_e.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'hscript') diff --git a/hscript/script.cc b/hscript/script.cc index 6e436b7..59a799a 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -229,7 +229,7 @@ Script *Script::load(std::istream &sstream, const ScriptOptions &opts, if(name == "/dev/stdin") { curr_name = ""; } else { - curr_name = fs::canonical(fs::path(name)); + curr_name = fs::canonical(fs::path(name)).native(); } std::set seen = {curr_name}; bool inherit = false; @@ -270,7 +270,7 @@ Script *Script::load(std::istream &sstream, const ScriptOptions &opts, fs::path better_path = fs::absolute(curr_name); better_path.remove_filename(); better_path /= next_name; - next_name = fs::absolute(better_path); + next_name = fs::absolute(better_path).native(); } if(seen.find(next_name) != seen.end()) { diff --git a/hscript/script_e.cc b/hscript/script_e.cc index 87ade0f..2ad1a98 100644 --- a/hscript/script_e.cc +++ b/hscript/script_e.cc @@ -13,6 +13,7 @@ #include #include #include +#include #include #ifdef HAS_INSTALL_ENV # include -- cgit v1.2.3-70-g09d2