about summary refs log tree commit diff
path: root/library/std/tests/switch-stdout.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/tests/switch-stdout.rs')
-rw-r--r--library/std/tests/switch-stdout.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/tests/switch-stdout.rs b/library/std/tests/switch-stdout.rs
index 42011a9b3da..91fe0200f6c 100644
--- a/library/std/tests/switch-stdout.rs
+++ b/library/std/tests/switch-stdout.rs
@@ -14,7 +14,7 @@ use std::os::windows::io::OwnedHandle;
 fn switch_stdout_to(file: OwnedFd) -> OwnedFd {
     use std::os::unix::prelude::*;
 
-    extern "C" {
+    unsafe extern "C" {
         fn dup(old: i32) -> i32;
         fn dup2(old: i32, new: i32) -> i32;
     }
@@ -32,7 +32,7 @@ fn switch_stdout_to(file: OwnedFd) -> OwnedFd {
 fn switch_stdout_to(file: OwnedHandle) -> OwnedHandle {
     use std::os::windows::prelude::*;
 
-    extern "system" {
+    unsafe extern "system" {
         fn GetStdHandle(nStdHandle: u32) -> *mut u8;
         fn SetStdHandle(nStdHandle: u32, handle: *mut u8) -> i32;
     }