git: c06360af56e8 - stable/15 - sys/compat/freebsd32: use freebsd32_uint64_t for several struct stat's
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 21 Feb 2026 21:34:48 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=c06360af56e87b70a055655de29dfd0144ee5666
commit c06360af56e87b70a055655de29dfd0144ee5666
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-02-05 19:39:27 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-02-21 21:34:08 +0000
sys/compat/freebsd32: use freebsd32_uint64_t for several struct stat's
(cherry picked from commit beee89472e3e0e3640c9db5c34a6e422830ff00f)
---
sys/compat/freebsd32/freebsd32.h | 10 +++++-----
sys/compat/freebsd32/freebsd32_misc.c | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h
index 78eb34694f7d..2be4810ff44b 100644
--- a/sys/compat/freebsd32/freebsd32.h
+++ b/sys/compat/freebsd32/freebsd32.h
@@ -227,12 +227,12 @@ struct stat32 {
#endif
struct timespec32 st_birthtim;
off_t st_size;
- int64_t st_blocks;
+ freebsd32_uint64_t st_blocks;
uint32_t st_blksize;
uint32_t st_flags;
- uint64_t st_gen;
- uint64_t st_filerev;
- uint64_t st_spare[9];
+ freebsd32_uint64_t st_gen;
+ freebsd32_uint64_t st_filerev;
+ freebsd32_uint64_t st_spare[9];
};
struct freebsd11_stat32 {
uint32_t st_dev;
@@ -246,7 +246,7 @@ struct freebsd11_stat32 {
struct timespec32 st_mtim;
struct timespec32 st_ctim;
off_t st_size;
- int64_t st_blocks;
+ freebsd32_uint64_t st_blocks;
uint32_t st_blksize;
uint32_t st_flags;
uint32_t st_gen;
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 7a624b45cbf7..457e599c22d2 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2287,11 +2287,11 @@ copy_stat(struct stat *in, struct stat32 *out)
TS_CP(*in, *out, st_mtim);
TS_CP(*in, *out, st_ctim);
CP(*in, *out, st_size);
- CP(*in, *out, st_blocks);
+ FU64_CP(*in, *out, st_blocks);
CP(*in, *out, st_blksize);
CP(*in, *out, st_flags);
- CP(*in, *out, st_gen);
- CP(*in, *out, st_filerev);
+ FU64_CP(*in, *out, st_gen);
+ FU64_CP(*in, *out, st_filerev);
CP(*in, *out, st_bsdflags);
TS_CP(*in, *out, st_birthtim);
out->st_padding1 = 0;
@@ -2500,7 +2500,7 @@ freebsd11_cvtstat32(struct stat *in, struct freebsd11_stat32 *out)
TS_CP(*in, *out, st_mtim);
TS_CP(*in, *out, st_ctim);
CP(*in, *out, st_size);
- CP(*in, *out, st_blocks);
+ FU64_CP(*in, *out, st_blocks);
CP(*in, *out, st_blksize);
CP(*in, *out, st_flags);
CP(*in, *out, st_gen);