Author: kib Date: Sat Jul 1 22:52:17 2017 New Revision: 320558 URL: https://svnweb.freebsd.org/changeset/base/320558
Log: Port PowerPC kqueue(2) compat32 fix in r320500 to MIPS. All 32bit MIPS ABIs align uint64_t on 8-byte. Since struct kevent32 is defined using 32bit types to avoid extra alignment on amd64/i386, layout of the structure needs paddings on PowerPC and apparently MIPS. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D11434 Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Sat Jul 1 22:21:11 2017 (r320557) +++ head/sys/compat/freebsd32/freebsd32.h Sat Jul 1 22:52:17 2017 (r320558) @@ -141,12 +141,12 @@ struct kevent32 { short filter; /* filter for event */ u_short flags; u_int fflags; -#ifdef __powerpc__ +#ifndef __amd64__ uint32_t pad0; #endif int32_t data1, data2; uint32_t udata; /* opaque user data identifier */ -#ifdef __powerpc__ +#ifndef __amd64__ uint32_t pad1; #endif uint32_t ext64[8]; Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Jul 1 22:21:11 2017 (r320557) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Jul 1 22:52:17 2017 (r320558) @@ -119,10 +119,10 @@ CTASSERT(sizeof(struct statfs32) == 256); CTASSERT(sizeof(struct rusage32) == 72); #endif CTASSERT(sizeof(struct sigaltstack32) == 12); -#ifdef __powerpc__ -CTASSERT(sizeof(struct kevent32) == 64); -#else +#ifdef __amd64__ CTASSERT(sizeof(struct kevent32) == 56); +#else +CTASSERT(sizeof(struct kevent32) == 64); #endif CTASSERT(sizeof(struct iovec32) == 8); CTASSERT(sizeof(struct msghdr32) == 28); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"