| 1 |
This commit is based on the upstream commit described below (whose commit |
| 2 |
message doesn't seem to make much sense) adapted for use int the Debian package |
| 3 |
by Peter Michael Green |
| 4 |
|
| 5 |
commit 25b797c2dd4951729db6d9124412e1cffad4cf46 |
| 6 |
Author: Dilawar Singh <[email protected]> |
| 7 |
Date: Tue Sep 6 10:30:46 2022 +0530 |
| 8 |
|
| 9 |
fix: #4 |
| 10 |
|
| 11 |
But using master branch from socket2 |
| 12 |
|
| 13 |
Index: dns-lookup/Cargo.toml |
| 14 |
=================================================================== |
| 15 |
--- dns-lookup.orig/Cargo.toml |
| 16 |
+++ dns-lookup/Cargo.toml |
| 17 |
@@ -27,3 +27,3 @@ repository = "https://github.com/keepero |
| 18 |
[dependencies.socket2] |
| 19 |
-version = "^0.4" |
| 20 |
+version = "^0.5" |
| 21 |
[target."cfg(unix)".dependencies.libc] |
| 22 |
Index: dns-lookup/src/addrinfo.rs |
| 23 |
=================================================================== |
| 24 |
--- dns-lookup.orig/src/addrinfo.rs |
| 25 |
+++ dns-lookup/src/addrinfo.rs |
| 26 |
@@ -101,7 +101,7 @@ impl AddrInfo { |
| 27 |
} |
| 28 |
|
| 29 |
let addrinfo = *a; |
| 30 |
- let ((), sockaddr) = SockAddr::init(|storage, len| { |
| 31 |
+ let ((), sockaddr) = SockAddr::try_init(|storage, len| { |
| 32 |
*len = addrinfo.ai_addrlen as _; |
| 33 |
std::ptr::copy_nonoverlapping( |
| 34 |
addrinfo.ai_addr as *const u8, |