Author: kib
Date: Fri Jun 30 16:12:57 2017
New Revision: 320500
URL: https://svnweb.freebsd.org/changeset/base/320500

Log:
  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

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       Fri Jun 30 16:10:21 2017        
(r320499)
+++ head/sys/compat/freebsd32/freebsd32.h       Fri Jun 30 16:12:57 2017        
(r320500)
@@ -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];
 };
 

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c  Fri Jun 30 16:10:21 2017        
(r320499)
+++ head/sys/compat/freebsd32/freebsd32_misc.c  Fri Jun 30 16:12:57 2017        
(r320500)
@@ -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__
_______________________________________________
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"

Reply via email to