Date: Sat, 3 Mar 2012 21:39:12 +0000 (UTC) From: Juli Mallett <jmallett@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r232475 - head/sys/compat/freebsd32 Message-ID: <201203032139.q23LdCoI001083@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jmallett Date: Sat Mar 3 21:39:12 2012 New Revision: 232475 URL: http://svn.freebsd.org/changeset/base/232475 Log: On MIPS, _ALIGN always aligns to 8 bytes, even for 32-bit binaries. This might not be ideal, but is the ABI we've shipped so far. Fix macros which reflect the results of _ALIGN on 32-bit MIPS to use the right alignment. This fixes sendmsg under COMPAT_FREEBSD32 on n64 MIPS kernels. Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Mar 3 19:03:26 2012 (r232474) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Mar 3 21:39:12 2012 (r232475) @@ -952,7 +952,11 @@ freebsd32_copyoutmsghdr(struct msghdr *m return (error); } +#ifndef __mips__ #define FREEBSD32_ALIGNBYTES (sizeof(int) - 1) +#else +#define FREEBSD32_ALIGNBYTES (sizeof(long) - 1) +#endif #define FREEBSD32_ALIGN(p) \ (((u_long)(p) + FREEBSD32_ALIGNBYTES) & ~FREEBSD32_ALIGNBYTES) #define FREEBSD32_CMSG_SPACE(l) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203032139.q23LdCoI001083>