diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-07-05 00:07:48 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-07-05 00:07:48 -0500 |
commit | c1a91704745f4243809f82478ab943cb9f9d005f (patch) | |
tree | dd3228b913727a6ca160f8ee5c1461844db06fbd /hscript | |
parent | 31a180057454698703435dbb891abfb627bb11a4 (diff) | |
download | horizon-c1a91704745f4243809f82478ab943cb9f9d005f.tar.gz horizon-c1a91704745f4243809f82478ab943cb9f9d005f.tar.bz2 horizon-c1a91704745f4243809f82478ab943cb9f9d005f.tar.xz horizon-c1a91704745f4243809f82478ab943cb9f9d005f.zip |
hscript: Portability fixes for libc++
Diffstat (limited to 'hscript')
-rw-r--r-- | hscript/script.cc | 4 | ||||
-rw-r--r-- | hscript/script_e.cc | 1 |
2 files changed, 3 insertions, 2 deletions
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 = "<stdin>"; } else { - curr_name = fs::canonical(fs::path(name)); + curr_name = fs::canonical(fs::path(name)).native(); } std::set<std::string> 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 <algorithm> #include <fstream> #include <set> +#include <sstream> #include <string> #ifdef HAS_INSTALL_ENV # include <parted/parted.h> |