Skip to content

Commit 89d2de0

Browse files
committed
Update windows-bindgen to 0.58.0
1 parent 13d5a42 commit 89d2de0

File tree

5 files changed

+153
-851
lines changed

5 files changed

+153
-851
lines changed

std/src/sys/pal/windows/c.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ use crate::os::raw::{c_char, c_long, c_longlong, c_uint, c_ulong, c_ushort, c_vo
1313
use crate::os::windows::io::{AsRawHandle, BorrowedHandle};
1414
use crate::ptr;
1515

16+
mod windows_targets;
17+
1618
mod windows_sys;
1719
pub use windows_sys::*;
1820

@@ -504,11 +506,8 @@ if #[cfg(not(target_vendor = "uwp"))] {
504506
#[cfg(target_arch = "arm")]
505507
pub enum CONTEXT {}
506508
}}
507-
508-
#[link(name = "ws2_32")]
509-
extern "system" {
510-
pub fn WSAStartup(wversionrequested: u16, lpwsadata: *mut WSADATA) -> i32;
511-
}
509+
// WSAStartup is only redefined here so that we can override WSADATA for Arm32
510+
windows_targets::link!("ws2_32.dll" "system" fn WSAStartup(wversionrequested: u16, lpwsadata: *mut WSADATA) -> i32);
512511
#[cfg(target_arch = "arm")]
513512
#[repr(C)]
514513
pub struct WSADATA {

std/src/sys/pal/windows/c/bindings.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--out windows_sys.rs
2-
--config flatten std
2+
--config flatten sys
33
--filter
44
!Windows.Win32.Foundation.INVALID_HANDLE_VALUE
55
Windows.Wdk.Storage.FileSystem.FILE_COMPLETE_IF_OPLOCKED

0 commit comments

Comments
 (0)