@@ -13,6 +13,8 @@ use crate::os::raw::{c_char, c_long, c_longlong, c_uint, c_ulong, c_ushort, c_vo |
|
|
13 |
13 |
use crate::os::windows::io::{AsRawHandle, BorrowedHandle}; |
14 |
14 |
use crate::ptr; |
15 |
15 |
|
|
16 |
+mod windows_targets; |
|
17 |
+ |
16 |
18 |
mod windows_sys; |
17 |
19 |
pub use windows_sys::*; |
18 |
20 |
|
@@ -504,11 +506,8 @@ if #[cfg(not(target_vendor = "uwp"))] { |
|
|
504 |
506 |
#[cfg(target_arch = "arm")] |
505 |
507 |
pub enum CONTEXT {} |
506 |
508 |
}} |
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); |
512 |
511 |
#[cfg(target_arch = "arm")] |
513 |
512 |
#[repr(C)] |
514 |
513 |
pub struct WSADATA { |