diff --git a/library/std/src/sys/windows/net.rs b/library/std/src/sys/windows/net.rs index 84a5a389e0db3..9c631e7e51c1d 100644 --- a/library/std/src/sys/windows/net.rs +++ b/library/std/src/sys/windows/net.rs @@ -29,12 +29,12 @@ pub mod netc { pub struct Socket(OwnedSocket); -static WSA: SyncOnceCell i32> = SyncOnceCell::new(); +static WSA_CLEANUP: SyncOnceCell i32> = SyncOnceCell::new(); /// Checks whether the Windows socket interface has been started already, and /// if not, starts it. pub fn init() { - let _ = WSA.get_or_init(|| unsafe { + let _ = WSA_CLEANUP.get_or_init(|| unsafe { let mut data: c::WSADATA = mem::zeroed(); let ret = c::WSAStartup( 0x202, // version 2.2 @@ -51,7 +51,7 @@ pub fn init() { pub fn cleanup() { // only perform cleanup if network functionality was actually initialized - if let Some(cleanup) = WSA.get() { + if let Some(cleanup) = WSA_CLEANUP.get() { unsafe { cleanup(); } diff --git a/src/test/run-make/issue-85441/Makefile b/src/test/run-make/issue-85441/Makefile index 0de956d3aee52..c7ae708c173c1 100644 --- a/src/test/run-make/issue-85441/Makefile +++ b/src/test/run-make/issue-85441/Makefile @@ -1,4 +1,4 @@ -# only-windows +# only-windows-msvc -include ../../run-make-fulldeps/tools.mk