diff options
| author | Meziu <meziu210@icloud.com> | 2021-10-19 17:59:59 +0200 |
|---|---|---|
| committer | Mark Drobnak <mark.drobnak@gmail.com> | 2022-06-13 20:44:39 -0700 |
| commit | 4e808f87ccb706d339c9ea10c3c9a9c9fd7fc6cb (patch) | |
| tree | fe1be89ab4da7ec631c4c4d7bd6f824d95c29da4 /library/std/src/sys/unix/os.rs | |
| parent | 3bdec3c8abdc48e46715d7b14b764af28da1cee3 (diff) | |
| download | rust-4e808f87ccb706d339c9ea10c3c9a9c9fd7fc6cb.tar.gz rust-4e808f87ccb706d339c9ea10c3c9a9c9fd7fc6cb.zip | |
Horizon OS STD support
Co-authored-by: Ian Chamberlain <ian.h.chamberlain@gmail.com> Co-authored-by: Mark Drobnak <mark.drobnak@gmail.com>
Diffstat (limited to 'library/std/src/sys/unix/os.rs')
| -rw-r--r-- | library/std/src/sys/unix/os.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/std/src/sys/unix/os.rs b/library/std/src/sys/unix/os.rs index 92bea9346d8..7252ad32184 100644 --- a/library/std/src/sys/unix/os.rs +++ b/library/std/src/sys/unix/os.rs @@ -446,7 +446,7 @@ pub fn current_exe() -> io::Result<PathBuf> { path.canonicalize() } -#[cfg(target_os = "espidf")] +#[cfg(any(target_os = "espidf", target_os = "horizon"))] pub fn current_exe() -> io::Result<PathBuf> { super::unsupported::unsupported() } @@ -601,7 +601,8 @@ pub fn home_dir() -> Option<PathBuf> { target_os = "emscripten", target_os = "redox", target_os = "vxworks", - target_os = "espidf" + target_os = "espidf", + target_os = "horizon" ))] unsafe fn fallback() -> Option<OsString> { None @@ -612,7 +613,8 @@ pub fn home_dir() -> Option<PathBuf> { target_os = "emscripten", target_os = "redox", target_os = "vxworks", - target_os = "espidf" + target_os = "espidf", + target_os = "horizon" )))] unsafe fn fallback() -> Option<OsString> { let amt = match libc::sysconf(libc::_SC_GETPW_R_SIZE_MAX) { |
