File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
library/std/src/sys/unix/ext/net Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,8 @@ fn add_to_ancillary_data<T>(
160160 previous_cmsg = cmsg;
161161 cmsg = libc:: CMSG_NXTHDR ( & msg, cmsg) ;
162162 cfg_if:: cfg_if! {
163+ // Android return the same pointer if it is the last cmsg.
164+ // Therefore, check it if the previous pointer is the same as the current one.
163165 if #[ cfg( target_os = "android" ) ] {
164166 if cmsg == previous_cmsg {
165167 break ;
@@ -430,6 +432,8 @@ impl<'a> Iterator for Messages<'a> {
430432
431433 let cmsg = cmsg. as_ref ( ) ?;
432434 cfg_if:: cfg_if! {
435+ // Android return the same pointer if it is the last cmsg.
436+ // Therefore, check it if the previous pointer is the same as the current one.
433437 if #[ cfg( target_os = "android" ) ] {
434438 if let Some ( current) = self . current {
435439 if eq( current, cmsg) {
You can’t perform that action at this time.
0 commit comments