Fix some imports and paths
This commit is contained in:
parent
9d691bd9ce
commit
90dbf59b92
|
@ -344,9 +344,6 @@ extern crate unwind;
|
|||
// testing gives test-std access to real-std lang items and globals. See #2912
|
||||
#[cfg(test)] extern crate std as realstd;
|
||||
|
||||
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
|
||||
extern crate fortanix_sgx_abi;
|
||||
|
||||
// The standard macros that are not built-in to the compiler.
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
|
|
|
@ -22,7 +22,7 @@ pub fn read(fd: Fd, buf: &mut [u8]) -> IoResult<usize> {
|
|||
#[unstable(feature = "sgx_platform", issue = "56975")]
|
||||
pub fn read_alloc(fd: Fd) -> IoResult<Vec<u8>> {
|
||||
unsafe {
|
||||
let userbuf = ByteBuffer { data: ::ptr::null_mut(), len: 0 };
|
||||
let userbuf = ByteBuffer { data: crate::ptr::null_mut(), len: 0 };
|
||||
let mut userbuf = alloc::User::new_from_enclave(&userbuf);
|
||||
raw::read_alloc(fd, userbuf.as_raw_mut_ptr()).from_sgx_result()?;
|
||||
Ok(userbuf.copy_user_buffer())
|
||||
|
|
|
@ -39,7 +39,6 @@ mod imp {
|
|||
use libc::{sigaltstack, SIGSTKSZ, SS_DISABLE};
|
||||
use libc::{sigaction, SIGBUS, SIG_DFL,
|
||||
SA_SIGINFO, SA_ONSTACK, sighandler_t};
|
||||
use libc;
|
||||
use libc::{mmap, munmap};
|
||||
use libc::{SIGSEGV, PROT_READ, PROT_WRITE, MAP_PRIVATE, MAP_ANON};
|
||||
use libc::MAP_FAILED;
|
||||
|
|
|
@ -11,7 +11,7 @@ pub fn dumb_print(args: fmt::Arguments) {
|
|||
|
||||
// Other platforms should use the appropriate platform-specific mechanism for
|
||||
// aborting the process. If no platform-specific mechanism is available,
|
||||
// ::intrinsics::abort() may be used instead. The above implementations cover
|
||||
// crate::intrinsics::abort() may be used instead. The above implementations cover
|
||||
// all targets currently supported by libstd.
|
||||
|
||||
pub fn abort(args: fmt::Arguments) -> ! {
|
||||
|
|
Loading…
Reference in New Issue