File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,23 @@ impl From<SocketAddrV4> for SockAddr {
285285 storage. sin_zero = Default :: default ( ) ;
286286 mem:: size_of :: < sockaddr_in > ( ) as socklen_t
287287 } ;
288+ #[ cfg( any(
289+ target_os = "dragonfly" ,
290+ target_os = "freebsd" ,
291+ target_os = "haiku" ,
292+ target_os = "hermit" ,
293+ target_os = "ios" ,
294+ target_os = "macos" ,
295+ target_os = "netbsd" ,
296+ target_os = "nto" ,
297+ target_os = "openbsd" ,
298+ target_os = "tvos" ,
299+ target_os = "vxworks" ,
300+ target_os = "watchos" ,
301+ ) ) ]
302+ {
303+ storage. ss_len = len as u8 ;
304+ }
288305 SockAddr { storage, len }
289306 }
290307}
@@ -311,6 +328,23 @@ impl From<SocketAddrV6> for SockAddr {
311328 }
312329 mem:: size_of :: < sockaddr_in6 > ( ) as socklen_t
313330 } ;
331+ #[ cfg( any(
332+ target_os = "dragonfly" ,
333+ target_os = "freebsd" ,
334+ target_os = "haiku" ,
335+ target_os = "hermit" ,
336+ target_os = "ios" ,
337+ target_os = "macos" ,
338+ target_os = "netbsd" ,
339+ target_os = "nto" ,
340+ target_os = "openbsd" ,
341+ target_os = "tvos" ,
342+ target_os = "vxworks" ,
343+ target_os = "watchos" ,
344+ ) ) ]
345+ {
346+ storage. ss_len = len as u8 ;
347+ }
314348 SockAddr { storage, len }
315349 }
316350}
You can’t perform that action at this time.
0 commit comments