Skip to content

Commit

Permalink
CFI: Add missing use core::ffi::c_int
Browse files Browse the repository at this point in the history
Adds missing use core::ffi::c_int for when
sanitizer_cfi_normalize_integers is defined.
  • Loading branch information
rcvalle committed Nov 10, 2023
1 parent 07a4b7e commit 55e3dc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/std/src/sys/unix/thread_local_dtor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
/// This is necessary because the __cxa_thread_atexit_impl implementation
/// std links to by default may be a C or C++ implementation that was not
/// compiled using the Clang integer normalization option.
#[cfg(sanitizer_cfi_normalize_integers)]
use core::ffi::c_int;
#[cfg(not(sanitizer_cfi_normalize_integers))]
#[cfi_encoding = "i"]
#[repr(transparent)]
Expand Down

0 comments on commit 55e3dc4

Please sign in to comment.