File tree 1 file changed +4
-0
lines changed
library/std/src/sys/unix/ext/net
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>(
160
160
previous_cmsg = cmsg;
161
161
cmsg = libc:: CMSG_NXTHDR ( & msg, cmsg) ;
162
162
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.
163
165
if #[ cfg( target_os = "android" ) ] {
164
166
if cmsg == previous_cmsg {
165
167
break ;
@@ -430,6 +432,8 @@ impl<'a> Iterator for Messages<'a> {
430
432
431
433
let cmsg = cmsg. as_ref ( ) ?;
432
434
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.
433
437
if #[ cfg( target_os = "android" ) ] {
434
438
if let Some ( current) = self . current {
435
439
if eq( current, cmsg) {
You can’t perform that action at this time.
0 commit comments