+++ b/sys/compat/freebsd32/freebsd32.h > > @@ -36,8 +36,17 @@ > > #include > > > > /* > > - * i386 is the only arch with a 32-bit time_t > > + * i386 is the only arch with a 32-bit time_t. > > + * Also it is the only arch with (u)int64_t having 4-bytes alignment. > > */ > > +typedef struct { > > +#ifdef __amd64__ > > + uint32_t val[2]; > > +#else > > + uint64_t val; > > +#endif > > +} freebsd32_uint64_t; > > Any reason not to use: > > typedef uint64_t freebsd32_uint64_t __aligned(4); > > on amd64 (and normal typedef elsewhere)? Then you can just use the > normal CP. See for example https://godbolt.org/z/svseWv7xo. Yes, this way it uses only std C instead of the GNU extension, and not depend on compiler properly handle unaligned types. IMO it is better that way, and all machinery is hidden under the typedef+ the macro.