Skip to content

Commit 49e2403

Browse files
committed
libstd: allow improper_ctypes in sys/sgx
Signed-off-by: David Wood <[email protected]>
1 parent 95c505d commit 49e2403

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/libstd/sys/sgx/abi/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ unsafe extern "C" fn tcs_init(secondary: bool) {
5353
// (main function exists). If this is a library, the crate author should be
5454
// able to specify this
5555
#[cfg(not(test))]
56+
#[allow(improper_ctypes)]
5657
#[no_mangle]
5758
extern "C" fn entry(p1: u64, p2: u64, p3: u64, secondary: bool, p4: u64, p5: u64) -> (u64, u64) {
5859
// FIXME: how to support TLS in library mode?

src/libstd/sys/sgx/rwlock.rs

+3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ const EINVAL: i32 = 22;
172172

173173
#[cfg(not(test))]
174174
#[no_mangle]
175+
#[allow(improper_ctypes)]
175176
pub unsafe extern "C" fn __rust_rwlock_rdlock(p: *mut RWLock) -> i32 {
176177
if p.is_null() {
177178
return EINVAL;
@@ -181,6 +182,7 @@ pub unsafe extern "C" fn __rust_rwlock_rdlock(p: *mut RWLock) -> i32 {
181182
}
182183

183184
#[cfg(not(test))]
185+
#[allow(improper_ctypes)]
184186
#[no_mangle]
185187
pub unsafe extern "C" fn __rust_rwlock_wrlock(p: *mut RWLock) -> i32 {
186188
if p.is_null() {
@@ -190,6 +192,7 @@ pub unsafe extern "C" fn __rust_rwlock_wrlock(p: *mut RWLock) -> i32 {
190192
return 0;
191193
}
192194
#[cfg(not(test))]
195+
#[allow(improper_ctypes)]
193196
#[no_mangle]
194197
pub unsafe extern "C" fn __rust_rwlock_unlock(p: *mut RWLock) -> i32 {
195198
if p.is_null() {

0 commit comments

Comments
 (0)