summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2021-09-27 10:40:36 +0200
committerDavid Lönnhager <david.l@mullvad.net>2021-09-27 10:40:36 +0200
commit686498a15bc1e4cdff2899f35c01d1ad1ad34e02 (patch)
tree382e56e6592331c991e62ce829ee750851ed4739
parent2c56264c4c3d5867c1fae3141687ecd0ef9ca9bc (diff)
parent20152e1e63762dc12764f8b3f6a2e503450f58c1 (diff)
downloadmullvadvpn-686498a15bc1e4cdff2899f35c01d1ad1ad34e02.tar.xz
mullvadvpn-686498a15bc1e4cdff2899f35c01d1ad1ad34e02.zip
Merge branch 'update-wintun-imports'
-rw-r--r--talpid-core/src/tunnel/openvpn/windows.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/talpid-core/src/tunnel/openvpn/windows.rs b/talpid-core/src/tunnel/openvpn/windows.rs
index db5cd4d933..8e73245815 100644
--- a/talpid-core/src/tunnel/openvpn/windows.rs
+++ b/talpid-core/src/tunnel/openvpn/windows.rs
@@ -239,46 +239,46 @@ impl WintunDll {
Ok(WintunDll {
handle,
func_open: unsafe {
- std::mem::transmute(get_proc_fn(
+ *((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WintunOpenAdapter\0").unwrap(),
- )?)
+ )?) as *const _ as *const _)
},
func_create: unsafe {
- std::mem::transmute(get_proc_fn(
+ *((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WintunCreateAdapter\0").unwrap(),
- )?)
+ )?) as *const _ as *const _)
},
func_delete: unsafe {
- std::mem::transmute(get_proc_fn(
+ *((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WintunDeleteAdapter\0").unwrap(),
- )?)
+ )?) as *const _ as *const _)
},
func_free: unsafe {
- std::mem::transmute(get_proc_fn(
+ *((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WintunFreeAdapter\0").unwrap(),
- )?)
+ )?) as *const _ as *const _)
},
func_get_adapter_name: unsafe {
- std::mem::transmute(get_proc_fn(
+ *((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WintunGetAdapterName\0").unwrap(),
- )?)
+ )?) as *const _ as *const _)
},
func_get_adapter_luid: unsafe {
- std::mem::transmute(get_proc_fn(
+ *((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WintunGetAdapterLUID\0").unwrap(),
- )?)
+ )?) as *const _ as *const _)
},
func_set_logger: unsafe {
- std::mem::transmute(get_proc_fn(
+ *((&get_proc_fn(
handle,
CStr::from_bytes_with_nul(b"WintunSetLogger\0").unwrap(),
- )?)
+ )?) as *const _ as *const _)
},
})
}