about summary refs log tree commit diff
path: root/example/alloc_example.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-02-01 10:11:46 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2021-02-01 10:11:46 +0100
commita75f9bc3be1d9488de2d13e4afbf724ffadfc70f (patch)
treecad2e5a8fe6635c92a496921493d5bdc3e28c19f /example/alloc_example.rs
parente67b72de2e9c4de59c68f2ad7f0ab117d2446c9e (diff)
downloadrust-a75f9bc3be1d9488de2d13e4afbf724ffadfc70f.tar.gz
rust-a75f9bc3be1d9488de2d13e4afbf724ffadfc70f.zip
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01
Diffstat (limited to 'example/alloc_example.rs')
-rw-r--r--example/alloc_example.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/alloc_example.rs b/example/alloc_example.rs
index dc2ad4c676e..f59600ebb33 100644
--- a/example/alloc_example.rs
+++ b/example/alloc_example.rs
@@ -11,7 +11,8 @@ use alloc_system::System;
 #[global_allocator]
 static ALLOC: System = System;
 
-#[link(name = "c")]
+#[cfg_attr(unix, link(name = "c"))]
+#[cfg_attr(target_env = "msvc", link(name = "msvcrt"))]
 extern "C" {
     fn puts(s: *const u8) -> i32;
 }