diff options
| author | David Wood <david@davidtw.co> | 2019-11-05 13:17:05 +0000 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2019-11-05 13:17:05 +0000 |
| commit | 49e240346fe75eb5380469fb8e901f007fa829c1 (patch) | |
| tree | 825c7524647d3b027b07a93c698ac31a5320296c /src/libstd/sys | |
| parent | 95c505d92a64ff86a081d108e33b4e4f1e70ebfb (diff) | |
| download | rust-49e240346fe75eb5380469fb8e901f007fa829c1.tar.gz rust-49e240346fe75eb5380469fb8e901f007fa829c1.zip | |
libstd: allow `improper_ctypes` in `sys/sgx`
Signed-off-by: David Wood <david@davidtw.co>
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/sgx/abi/mod.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/sgx/rwlock.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sys/sgx/abi/mod.rs b/src/libstd/sys/sgx/abi/mod.rs index 0f107de83f0..3a9b1fc8684 100644 --- a/src/libstd/sys/sgx/abi/mod.rs +++ b/src/libstd/sys/sgx/abi/mod.rs @@ -53,6 +53,7 @@ unsafe extern "C" fn tcs_init(secondary: bool) { // (main function exists). If this is a library, the crate author should be // able to specify this #[cfg(not(test))] +#[allow(improper_ctypes)] #[no_mangle] extern "C" fn entry(p1: u64, p2: u64, p3: u64, secondary: bool, p4: u64, p5: u64) -> (u64, u64) { // FIXME: how to support TLS in library mode? diff --git a/src/libstd/sys/sgx/rwlock.rs b/src/libstd/sys/sgx/rwlock.rs index e2f94b1d928..c32e6dd3786 100644 --- a/src/libstd/sys/sgx/rwlock.rs +++ b/src/libstd/sys/sgx/rwlock.rs @@ -172,6 +172,7 @@ const EINVAL: i32 = 22; #[cfg(not(test))] #[no_mangle] +#[allow(improper_ctypes)] pub unsafe extern "C" fn __rust_rwlock_rdlock(p: *mut RWLock) -> i32 { if p.is_null() { return EINVAL; @@ -181,6 +182,7 @@ pub unsafe extern "C" fn __rust_rwlock_rdlock(p: *mut RWLock) -> i32 { } #[cfg(not(test))] +#[allow(improper_ctypes)] #[no_mangle] pub unsafe extern "C" fn __rust_rwlock_wrlock(p: *mut RWLock) -> i32 { if p.is_null() { @@ -190,6 +192,7 @@ pub unsafe extern "C" fn __rust_rwlock_wrlock(p: *mut RWLock) -> i32 { return 0; } #[cfg(not(test))] +#[allow(improper_ctypes)] #[no_mangle] pub unsafe extern "C" fn __rust_rwlock_unlock(p: *mut RWLock) -> i32 { if p.is_null() { |
