File tree 1 file changed +3
-3
lines changed
library/std/src/os/unix/net
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,9 @@ impl SocketAddr {
112
112
// linux returns zero bytes of address
113
113
len = sun_path_offset ( & addr) as libc:: socklen_t ; // i.e., zero-length address
114
114
} else if cfg ! ( target_os = "openbsd" ) {
115
- // OpenBSD has a bug where the socket name's length
116
- // is more than what the buffer actually contains.
117
- // Figure out the length for ourselves.
115
+ // OpenBSD implements getsockname in a way where the
116
+ // socket name's length is more than what the buffer
117
+ // actually contains. Figure out the length for ourselves.
118
118
// https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2
119
119
let sun_path: & [ u8 ] = unsafe { crate :: mem:: transmute :: < & [ i8 ] , & [ u8 ] > ( & addr. sun_path ) } ;
120
120
len = crate :: sys:: memchr:: memchr ( 0 , sun_path)
You can’t perform that action at this time.
0 commit comments