Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5488,16 +5488,6 @@ fn test_aix(target: &str) {
// header does not define a separate standalone union type for it.
("ld_info", "_file") => true,

// On AIX, when _ALL_SOURCE is defined, the types of the following fields
// differ from those used when _XOPEN_SOURCE is defined. The former uses
// 'struct st_timespec', while the latter uses 'struct timespec'.
("stat", "st_atim") => true,
("stat", "st_mtim") => true,
("stat", "st_ctim") => true,
("stat64", "st_atim") => true,
("stat64", "st_mtim") => true,
("stat64", "st_ctim") => true,

_ => false,
}
});
Expand All @@ -5510,12 +5500,6 @@ fn test_aix(target: &str) {
// The field 'data' is actually a unnamed union in the AIX header.
"pollfd_ext" if field.ident() == "data" => true,

// On AIX, <stat.h> declares 'tv_nsec' as 'long', but the
// underlying system calls return a 32-bit value in both 32-bit
// and 64-bit modes. In the 'libc' crate it is declared as 'i32'
// to match the system call. Skip this field.
"timespec" if field.ident() == "tv_nsec" => true,

_ => false,
}
});
Expand Down
15 changes: 3 additions & 12 deletions src/unix/aix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,6 @@ s! {
pub tv_nsec: c_int,
}

// On AIX, <stat.h> declares 'tv_nsec' as 'long', but the underlying
// system calls return a 4-byte value in both 32-bit and 64-bit modes.
// It is declared as 'c_int' here to avoid using the other undefined 4
// bytes in the 64-bit mode.
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: c_int,
}

pub struct statfs64 {
pub f_version: c_int,
pub f_type: c_int,
Expand Down Expand Up @@ -479,9 +470,9 @@ s! {
pub st_gid: crate::gid_t,
pub st_rdev: dev_t,
pub st_ssize: c_int,
pub st_atim: crate::timespec,
pub st_mtim: crate::timespec,
pub st_ctim: crate::timespec,
pub st_atim: st_timespec,
pub st_mtim: st_timespec,
pub st_ctim: st_timespec,
pub st_blksize: blksize_t,
pub st_blocks: blkcnt_t,
pub st_vfstype: c_int,
Expand Down
6 changes: 3 additions & 3 deletions src/unix/aix/powerpc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ s! {
pub st_gid: crate::gid_t,
pub st_rdev: crate::dev_t,
pub st_ssize: c_int,
pub st_atim: crate::timespec,
pub st_mtim: crate::timespec,
pub st_ctim: crate::timespec,
pub st_atim: crate::st_timespec,
pub st_mtim: crate::st_timespec,
pub st_ctim: crate::st_timespec,
pub st_blksize: crate::blksize_t,
pub st_blocks: crate::blkcnt_t,
pub st_vfstype: c_int,
Expand Down
2 changes: 1 addition & 1 deletion src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ s! {

// linux x32 compatibility
// See https://sourceware.org/bugzilla/show_bug.cgi?id=16437
#[cfg(all(not(target_env = "gnu"), not(target_os = "aix")))]
#[cfg(not(target_env = "gnu"))]
pub struct timespec {
pub tv_sec: time_t,
#[cfg(all(musl32_time64, target_endian = "big"))]
Expand Down