Skip to content

Commit 71187e5

Browse files
committed
gnu arm: Make type stat64 an alias for struct stat
1 parent b99df80 commit 71187e5

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

libc-test/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,8 +3339,8 @@ fn test_linux(target: &str) {
33393339

33403340
// In MUSL `flock64` is a typedef to `flock`.
33413341
"flock64" if musl => format!("struct {}", ty),
3342-
// In some gnu targets `stat64` is a typedef to `stat`
3343-
"statfs64" if gnu => format!("struct {}", ty),
3342+
// In some gnu targets `stat64` is a typedef to `stat`
3343+
"stat64" | "statfs64" if gnu => format!("struct {}", ty),
33443344

33453345
// put `struct` in front of all structs:.
33463346
t if is_struct => format!("struct {}", t),

src/unix/linux_like/linux/gnu/b32/arm/mod.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,6 @@ s! {
5757
__unused2: ::c_ulong
5858
}
5959

60-
pub struct stat64 {
61-
pub st_dev: ::dev_t,
62-
pub st_ino: ::ino_t,
63-
pub st_mode: ::mode_t,
64-
pub st_nlink: ::nlink_t,
65-
pub st_uid: ::uid_t,
66-
pub st_gid: ::gid_t,
67-
pub st_rdev: ::dev_t,
68-
pub st_size: ::off64_t,
69-
pub st_blksize: ::blksize_t,
70-
pub st_blocks: ::blkcnt64_t,
71-
pub st_atime: ::time_t,
72-
pub st_atime_nsec: ::c_long,
73-
pub st_mtime: ::time_t,
74-
pub st_mtime_nsec: ::c_long,
75-
pub st_ctime: ::time_t,
76-
pub st_ctime_nsec: ::c_long,
77-
}
78-
7960
pub struct statvfs64 {
8061
pub f_bsize: ::c_ulong,
8162
pub f_frsize: ::c_ulong,

src/unix/linux_like/linux/gnu/b32/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ cfg_if! {
4040
pub type blksize_t = i32;
4141
}
4242
}
43+
cfg_if! {
44+
if #[cfg(target_arch = "arm")] {
45+
pub type stat64 = stat;
46+
}
47+
}
4348

4449
s! {
4550
pub struct stat {

0 commit comments

Comments
 (0)