From 6f3f78a7168456e62b6a2ea6852aa07a741ab64e Mon Sep 17 00:00:00 2001 From: David Wiesen Date: Tue, 7 Oct 2025 14:13:59 -0700 Subject: [PATCH] fix build errors. --- codex-rs/core/src/lib.rs | 4 ++++ codex-rs/core/src/windows_appcontainer.rs | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/codex-rs/core/src/lib.rs b/codex-rs/core/src/lib.rs index 0b184e79d1..ec8d66f6e2 100644 --- a/codex-rs/core/src/lib.rs +++ b/codex-rs/core/src/lib.rs @@ -1,5 +1,9 @@ //! Root of the `codex-core` library. +#![cfg_attr( + all(windows, feature = "windows_appcontainer_command_ext"), + feature(windows_process_extensions_raw_attribute) +)] // Prevent accidental direct writes to stdout/stderr in library code. All // user-visible output must go through the appropriate abstraction (e.g., // the TUI or the tracing stack). diff --git a/codex-rs/core/src/windows_appcontainer.rs b/codex-rs/core/src/windows_appcontainer.rs index c1fd9eeaa2..737135019e 100644 --- a/codex-rs/core/src/windows_appcontainer.rs +++ b/codex-rs/core/src/windows_appcontainer.rs @@ -1,5 +1,3 @@ -#![cfg(windows)] - use std::collections::HashMap; use std::io; use std::path::Path; @@ -120,7 +118,7 @@ mod imp { unsafe { let std_cmd = cmd.as_std_mut(); std_cmd.creation_flags(EXTENDED_STARTUPINFO_PRESENT.0); - std_cmd.raw_attribute_list(attribute_list.as_mut_ptr().0); + std_cmd.raw_attribute_list(attribute_list.as_mut_ptr().0.cast()); } let child = cmd.spawn(); @@ -392,7 +390,7 @@ mod imp { let explicit = EXPLICIT_ACCESS_W { grfAccessPermissions: permissions, grfAccessMode: SET_ACCESS, - grfInheritance: (SUB_CONTAINERS_AND_OBJECTS_INHERIT | OBJECT_INHERIT_ACE).0, + grfInheritance: SUB_CONTAINERS_AND_OBJECTS_INHERIT | OBJECT_INHERIT_ACE, Trustee: TRUSTEE_W { TrusteeForm: TRUSTEE_IS_SID, TrusteeType: TRUSTEE_IS_UNKNOWN,