File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ impl From<SocketAddrV4> for SockAddr {
216
216
sin_family : AF_INET as sa_family_t ,
217
217
sin_port : addr. port ( ) . to_be ( ) ,
218
218
sin_addr,
219
- .. unsafe { mem :: zeroed ( ) }
219
+ sin_zero : [ 0 ; 8 ] ,
220
220
} ;
221
221
SockAddr {
222
222
storage : unsafe { storage. assume_init ( ) } ,
@@ -255,7 +255,17 @@ impl From<SocketAddrV6> for SockAddr {
255
255
sin6_scope_id : addr. scope_id ( ) ,
256
256
#[ cfg( windows) ]
257
257
u,
258
- ..unsafe { mem:: zeroed ( ) }
258
+ #[ cfg( any(
259
+ target_os = "dragonfly" ,
260
+ target_os = "freebsd" ,
261
+ target_os = "ios" ,
262
+ target_os = "macos" ,
263
+ target_os = "netbsd" ,
264
+ target_os = "openbsd"
265
+ ) ) ]
266
+ sin6_len : 0 ,
267
+ #[ cfg( any( target_os = "solaris" , target_os = "illumos" ) ) ]
268
+ __sin6_src_id : 0 ,
259
269
} ;
260
270
SockAddr {
261
271
storage : unsafe { storage. assume_init ( ) } ,
You can’t perform that action at this time.
0 commit comments