about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect/src/detect
diff options
context:
space:
mode:
Diffstat (limited to 'library/stdarch/crates/std_detect/src/detect')
-rw-r--r--library/stdarch/crates/std_detect/src/detect/cache.rs2
-rw-r--r--library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/cache.rs b/library/stdarch/crates/std_detect/src/detect/cache.rs
index cee07b0ec7e..3056c28a806 100644
--- a/library/stdarch/crates/std_detect/src/detect/cache.rs
+++ b/library/stdarch/crates/std_detect/src/detect/cache.rs
@@ -140,7 +140,7 @@ cfg_if::cfg_if! {
                 if #[cfg(windows)] {
                     use alloc::vec;
                     #[link(name = "kernel32")]
-                    extern "system" {
+                    unsafe extern "system" {
                         fn GetEnvironmentVariableA(name: *const u8, buffer: *mut u8, size: u32) -> u32;
                     }
                     let len = unsafe { GetEnvironmentVariableA(RUST_STD_DETECT_UNSTABLE.as_ptr().cast::<u8>(), core::ptr::null_mut(), 0) };
diff --git a/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs b/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs
index faded671cc0..ec31701aecf 100644
--- a/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs
+++ b/library/stdarch/crates/std_detect/src/detect/os/windows/aarch64.rs
@@ -20,7 +20,7 @@ pub(crate) fn detect_features() -> cache::Initializer {
     const PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE: u32 = 44;
     const PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE: u32 = 45;
 
-    extern "system" {
+    unsafe extern "system" {
         pub fn IsProcessorFeaturePresent(ProcessorFeature: DWORD) -> BOOL;
     }