Skip to content

Commit 6bb671e

Browse files
authored
Rollup merge of #117790 - rcvalle:rust-cfi-fix-000000, r=workingjubilee
CFI: Add missing use core::ffi::c_int Adds missing use core::ffi::c_int for when sanitizer_cfi_normalize_integers is defined.
2 parents 390e3c8 + 55e3dc4 commit 6bb671e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/sys/unix/thread_local_dtor.rs

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
2323
/// This is necessary because the __cxa_thread_atexit_impl implementation
2424
/// std links to by default may be a C or C++ implementation that was not
2525
/// compiled using the Clang integer normalization option.
26+
#[cfg(sanitizer_cfi_normalize_integers)]
27+
use core::ffi::c_int;
2628
#[cfg(not(sanitizer_cfi_normalize_integers))]
2729
#[cfi_encoding = "i"]
2830
#[repr(transparent)]

0 commit comments

Comments
 (0)