libstd: allow improper_ctypes in sys/sgx

Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
David Wood 2019-11-05 13:17:05 +00:00
parent 95c505d92a
commit 49e240346f
No known key found for this signature in database
GPG Key ID: 2592E76C87381FD9
2 changed files with 4 additions and 0 deletions

View File

@ -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?

View File

@ -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() {