diff options
| author | Huang Qi <huangqi3@xiaomi.com> | 2024-09-19 16:00:56 +0800 |
|---|---|---|
| committer | Huang Qi <huangqi3@xiaomi.com> | 2024-09-24 15:35:40 +0800 |
| commit | 24f622cf801a840b0ad879ce5907f2cf316e26e8 (patch) | |
| tree | 36784c7813d4ef84d04cb234de49deba1ac76ea4 /library/std/src/sys/pal/unix/os.rs | |
| parent | f5cd2c5888011d4d80311e5b771c6da507d860dd (diff) | |
| download | rust-24f622cf801a840b0ad879ce5907f2cf316e26e8.tar.gz rust-24f622cf801a840b0ad879ce5907f2cf316e26e8.zip | |
Initial std library support for NuttX
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Diffstat (limited to 'library/std/src/sys/pal/unix/os.rs')
| -rw-r--r-- | library/std/src/sys/pal/unix/os.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/unix/os.rs b/library/std/src/sys/pal/unix/os.rs index 503f8915256..d99bde2f9a5 100644 --- a/library/std/src/sys/pal/unix/os.rs +++ b/library/std/src/sys/pal/unix/os.rs @@ -48,6 +48,7 @@ extern "C" { target_os = "openbsd", target_os = "android", target_os = "redox", + target_os = "nuttx", target_env = "newlib" ), link_name = "__errno" @@ -399,6 +400,7 @@ pub fn current_exe() -> io::Result<PathBuf> { target_os = "linux", target_os = "hurd", target_os = "android", + target_os = "nuttx", target_os = "emscripten" ))] pub fn current_exe() -> io::Result<PathBuf> { @@ -717,6 +719,7 @@ pub fn home_dir() -> Option<PathBuf> { target_os = "espidf", target_os = "horizon", target_os = "vita", + target_os = "nuttx", all(target_vendor = "apple", not(target_os = "macos")), ))] unsafe fn fallback() -> Option<OsString> { @@ -730,6 +733,7 @@ pub fn home_dir() -> Option<PathBuf> { target_os = "espidf", target_os = "horizon", target_os = "vita", + target_os = "nuttx", all(target_vendor = "apple", not(target_os = "macos")), )))] unsafe fn fallback() -> Option<OsString> { |
