From aa10d96f893f6ed7cdb27fd041bfcda37a49b27d Mon Sep 17 00:00:00 2001 From: He Sun Date: Sun, 26 Apr 2020 14:03:58 +0800 Subject: [PATCH] Fix u32::MAX not found error Using std::u32 instead of u32 passes the compilation. --- src/libos/src/util/sgx/sgx_attestation_agent.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libos/src/util/sgx/sgx_attestation_agent.rs b/src/libos/src/util/sgx/sgx_attestation_agent.rs index 3bcc35f0..6c6231b0 100644 --- a/src/libos/src/util/sgx/sgx_attestation_agent.rs +++ b/src/libos/src/util/sgx/sgx_attestation_agent.rs @@ -120,12 +120,9 @@ impl InnerAgent { Some(sigrl) => { let sigrl_ptr = sigrl.as_ptr(); let sigrl_size = { - // FIXME: u32::MAX is not provided by Rust SGX SDK - /* - if sigrl.len() > u32::MAX { + if sigrl.len() > std::u32::MAX as usize { return_errno!(EINVAL, "sigrl is too large"); } - */ sigrl.len() as u32 }; (sigrl_ptr, sigrl_size)