Amend the layout of kevent32 on powerpc where uint64_t has 8-byte

alignment.

Reported,tested and assertion updates by:	andreast
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Konstantin Belousov 2017-06-30 16:12:57 +00:00
parent 9fb8c888f1
commit cfb2d93ba6
2 changed files with 10 additions and 0 deletions

View File

@ -141,8 +141,14 @@ struct kevent32 {
short filter; /* filter for event */
u_short flags;
u_int fflags;
#ifdef __powerpc__
uint32_t pad0;
#endif
int32_t data1, data2;
uint32_t udata; /* opaque user data identifier */
#ifdef __powerpc__
uint32_t pad1;
#endif
uint32_t ext64[8];
};

View File

@ -119,7 +119,11 @@ CTASSERT(sizeof(struct statfs32) == 256);
CTASSERT(sizeof(struct rusage32) == 72);
#endif
CTASSERT(sizeof(struct sigaltstack32) == 12);
#ifdef __powerpc__
CTASSERT(sizeof(struct kevent32) == 64);
#else
CTASSERT(sizeof(struct kevent32) == 56);
#endif
CTASSERT(sizeof(struct iovec32) == 8);
CTASSERT(sizeof(struct msghdr32) == 28);
#ifdef __amd64__