Skip to content

Commit

Permalink
Don't try to use confstr in Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Oct 10, 2024
1 parent b62ee10 commit 1287eff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/std/src/sys/pal/unix/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,8 @@ fn darwin_temp_dir() -> PathBuf {
pub fn temp_dir() -> PathBuf {
crate::env::var_os("TMPDIR").map(PathBuf::from).unwrap_or_else(|| {
cfg_if::cfg_if! {
if #[cfg(target_vendor = "apple")] {
// FIXME: Support `confstr` in Miri.
if #[cfg(all(target_vendor = "apple", not(miri)))] {
darwin_temp_dir()
} else if #[cfg(target_os = "android")] {
PathBuf::from("/data/local/tmp")
Expand Down

0 comments on commit 1287eff

Please sign in to comment.