Skip to content

Commit 9fd9f59

Browse files
committed
Only test addresses of cmsghdrs that are multiples of the size of cmsghdr.
1 parent ca7a33d commit 9fd9f59

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

libc-test/tests/cmsg.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ mod t {
7373
mhdr.msg_controllen = (160 - trunc) as _;
7474

7575
for cmsg_payload_len in 0..64 {
76+
// AIX does not apply any alignment or padding to ancillary
77+
// data and CMSG_ALIGN() is a noop. So only test addresses
78+
// that are multiples of the size of cmsghdr here.
79+
if cfg!(target_os = "aix") && cmsg_payload_len % std::mem::size_of::<cmsghdr>() != 0
80+
{
81+
continue;
82+
}
83+
7684
let mut current_cmsghdr_ptr = pcmsghdr;
7785
assert!(!current_cmsghdr_ptr.is_null());
7886
let mut count = 0;

0 commit comments

Comments
 (0)