about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorRamon de C Valle <rcvalle@users.noreply.github.com>2023-11-10 07:42:27 -0800
committerRamon de C Valle <rcvalle@users.noreply.github.com>2023-11-10 08:20:04 -0800
commit55e3dc487fdf8025fb99301883e24af15323912a (patch)
treee6dcdc47b0c3ac76d89d6e0238d8937f28192f19 /library/std
parent07a4b7e2a9a4dc2840cd9311aad3ac3ebcb41543 (diff)
downloadrust-55e3dc487fdf8025fb99301883e24af15323912a.tar.gz
rust-55e3dc487fdf8025fb99301883e24af15323912a.zip
CFI: Add missing use core::ffi::c_int
Adds missing use core::ffi::c_int for when
sanitizer_cfi_normalize_integers is defined.
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/sys/unix/thread_local_dtor.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs
index 06399e8a274..667fd516962 100644
--- a/library/std/src/sys/unix/thread_local_dtor.rs
+++ b/library/std/src/sys/unix/thread_local_dtor.rs
@@ -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)]