Skip to content

Commit 9839e88

Browse files
committed
Remove Windows dependency on libc
1 parent f72885c commit 9839e88

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

library/std/Cargo.toml

-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ addr2line = { version = "0.21.0", optional = true, default-features = false }
3333
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
3434
libc = { version = "=0.2.153", default-features = false, features = ['rustc-dep-of-std'], public = true }
3535

36-
# Pin libc (pending https://github.com/rust-lang/rust/pull/124560)
37-
[target.'cfg(all(windows, target_env = "msvc"))'.dependencies]
38-
libc = { version = "=0.2.153", default-features = false }
39-
4036
[target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies]
4137
object = { version = "0.32.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] }
4238

library/std/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ extern crate alloc as alloc_crate;
435435
// so include it here even if it's unused.
436436
#[doc(masked)]
437437
#[allow(unused_extern_crates)]
438+
#[cfg(not(all(windows, target_env = "msvc")))]
438439
extern crate libc;
439440

440441
// We always need an unwinder currently for backtraces

library/std/src/os/raw/tests.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(not(all(windows, target_env = "msvc")))]
2+
13
use crate::any::TypeId;
24

35
macro_rules! ok {

0 commit comments

Comments
 (0)