Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 2012 14:40:23 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r230217 - stable/8/sys/kern
Message-ID:  <201201161440.q0GEeNYI038439@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Mon Jan 16 14:40:22 2012
New Revision: 230217
URL: http://svn.freebsd.org/changeset/base/230217

Log:
  Fix build breakage by adding missing mb_put_padbyte()

Modified:
  stable/8/sys/kern/subr_mchain.c

Modified: stable/8/sys/kern/subr_mchain.c
==============================================================================
--- stable/8/sys/kern/subr_mchain.c	Mon Jan 16 14:31:01 2012	(r230216)
+++ stable/8/sys/kern/subr_mchain.c	Mon Jan 16 14:40:22 2012	(r230217)
@@ -125,6 +125,21 @@ mb_reserve(struct mbchain *mbp, int size
 }
 
 int
+mb_put_padbyte(struct mbchain *mbp)
+{
+	caddr_t dst;
+	char x = 0;
+
+	dst = mtod(mbp->mb_cur, caddr_t) + mbp->mb_cur->m_len;
+
+	/* only add padding if address is odd */
+	if ((unsigned long)dst & 1)
+		return mb_put_mem(mbp, (caddr_t)&x, 1, MB_MSYSTEM);
+	else
+	return 0;
+}
+
+int
 mb_put_uint8(struct mbchain *mbp, u_int8_t x)
 {
 	return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201161440.q0GEeNYI038439>