git: f381a87145fa - stable/14 - sys/compat/freebsd32: use freebsd32_uint64_t for several struct stat's
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 Apr 2026 05:57:13 UTC
The branch stable/14 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=f381a87145fa4acebd5d2cfd97466c225a8397e1
commit f381a87145fa4acebd5d2cfd97466c225a8397e1
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-02-05 19:39:27 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-04-12 05:56:46 +0000
sys/compat/freebsd32: use freebsd32_uint64_t for several struct stat's
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55135
(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 b3b739bb6ad7..7a4cfc1fbf0b 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 894cb40506ea..c3b2b2141e30 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2255,11 +2255,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;
@@ -2468,7 +2468,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);