Skip to content

Commit 4779365

Browse files
authored
Merge pull request #313 from microsoft/kata/rust184
Prepare for build with rust v1.84
2 parents 8d1ba49 + 37b10e4 commit 4779365

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

src/agent/src/config.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44
//
5-
use crate::rpc;
65
use anyhow::{bail, ensure, Context, Result};
76
use serde::Deserialize;
87
use std::env;
@@ -63,7 +62,6 @@ pub struct AgentConfig {
6362
pub server_addr: String,
6463
pub unified_cgroup_hierarchy: bool,
6564
pub tracing: bool,
66-
pub supports_seccomp: bool,
6765
}
6866

6967
#[derive(Debug, Deserialize)]
@@ -137,7 +135,6 @@ impl Default for AgentConfig {
137135
server_addr: format!("{}:{}", VSOCK_ADDR, DEFAULT_AGENT_VSOCK_PORT),
138136
unified_cgroup_hierarchy: false,
139137
tracing: false,
140-
supports_seccomp: rpc::have_seccomp(),
141138
}
142139
}
143140
}

src/libs/kata-sys-util/src/protection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pub fn available_guest_protection() -> Result<GuestProtection, ProtectionError>
237237
Ok(GuestProtection::Se)
238238
}
239239

240-
#[cfg(target_arch = "powerpc64le")]
240+
#[cfg(all(target_arch = "powerpc64", target_endian = "little"))]
241241
pub fn available_guest_protection() -> Result<check::GuestProtection, check::ProtectionError> {
242242
if !Uid::effective().is_root() {
243243
return Err(check::ProtectionError::NoPerms);

src/libs/protocols/build.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,34 @@ fn real_main() -> Result<(), std::io::Error> {
215215
"self: ::std::boxed::Box<Self>",
216216
)?;
217217

218+
let mut box_pointers_files = vec![
219+
"src/types.rs",
220+
"src/agent.rs",
221+
"src/agent_ttrpc.rs",
222+
"src/csi.rs",
223+
"src/empty.rs",
224+
"src/gogo.rs",
225+
"src/health.rs",
226+
"src/health_ttrpc.rs",
227+
"src/oci.rs",
228+
];
229+
230+
#[cfg(feature = "async")]
231+
{
232+
box_pointers_files.extend(vec![
233+
"src/agent_ttrpc_async.rs",
234+
"src/health_ttrpc_async.rs"
235+
]);
236+
}
237+
238+
for f in box_pointers_files {
239+
replace_text_in_file(
240+
f,
241+
"#![allow(box_pointers)]",
242+
"",
243+
)?;
244+
}
245+
218246
Ok(())
219247
}
220248

src/tools/genpolicy/src/registry.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ pub fn add_verity_to_store(cache_file: &str, diff_id: &str, verity_hash: &str) -
374374
let mut writer = BufWriter::new(&file);
375375
writeln!(writer, "{}", serialized)?;
376376
writer.flush()?;
377+
#[allow(unstable_name_collisions)]
377378
file.unlock()?;
378379
Ok(())
379380
}

0 commit comments

Comments
 (0)