git: beee89472e3e - main - sys/compat/freebsd32: use freebsd32_uint64_t for several struct stat's
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 09 Feb 2026 19:07:01 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=beee89472e3e0e3640c9db5c34a6e422830ff00f
commit beee89472e3e0e3640c9db5c34a6e422830ff00f
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-02-05 19:39:27 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-02-09 18:57:19 +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
---
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 b79ddc71dbe8..5c7764b75335 100644
--- a/sys/compat/freebsd32/freebsd32.h
+++ b/sys/compat/freebsd32/freebsd32.h
@@ -230,12 +230,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;
@@ -249,7 +249,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);