From d98eb8fcdc99e1dc66288050b64e8cc09964d9a3 Mon Sep 17 00:00:00 2001 From: Xing Xue Date: Thu, 24 Jul 2025 08:31:53 -0400 Subject: [PATCH] Fix the type of the 'f_fsid' field in 'struct statvfs'. --- libc-test/build.rs | 3 +++ src/unix/aix/powerpc64.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 778b24b2d5e5e..e1f3c8176e99d 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -5623,6 +5623,9 @@ fn test_aix(target: &str) { ("__context64", "fpr") => true, ("__tm_context_t", "fpr") => true, + // The _ALL_SOURCE type of 'f_fsid' differs from POSIX's on AIX. + ("statvfs", "f_fsid") => true, + _ => false, } }); diff --git a/src/unix/aix/powerpc64.rs b/src/unix/aix/powerpc64.rs index f379e2df71898..b2b7ea88f6e4e 100644 --- a/src/unix/aix/powerpc64.rs +++ b/src/unix/aix/powerpc64.rs @@ -29,7 +29,7 @@ s! { pub f_files: crate::fsfilcnt_t, pub f_ffree: crate::fsfilcnt_t, pub f_favail: crate::fsfilcnt_t, - pub f_fsid: crate::fsid_t, + pub f_fsid: c_ulong, pub f_basetype: [c_char; 16], pub f_flag: c_ulong, pub f_namemax: c_ulong,