commit:     8efc88270606d78f64045fff6c70583e5052230e
Author:     Nicholas Vinson <nvinson234 <AT> gmail <DOT> com>
AuthorDate: Sun Jan  3 04:15:50 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sun Jan  3 08:39:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8efc8827

net-misc/vde: Fix for bug #543006

Added vde-2.2.2-gcc53.patch.  Starting with GCC 5, GCC uses Std. C semantics for
inline kewords instead of non-compliant GNU C semantics.  This patch corrects
the source with respect to the semantic difference.

Package-Manager: portage-2.2.26

 net-misc/vde/files/vde-2.2.2-gcc53.patch | 66 ++++++++++++++++++++++++++++++++
 net-misc/vde/vde-2.2.2-r1.ebuild         | 53 +++++++++++++++++++++++++
 2 files changed, 119 insertions(+)

diff --git a/net-misc/vde/files/vde-2.2.2-gcc53.patch 
b/net-misc/vde/files/vde-2.2.2-gcc53.patch
new file mode 100644
index 0000000..60fb98c
--- /dev/null
+++ b/net-misc/vde/files/vde-2.2.2-gcc53.patch
@@ -0,0 +1,66 @@
+--- src/slirpvde/misc.c        2016-01-02 22:54:35.746094904 -0500
++++ src/slirpvde/misc.c.old    2016-01-02 22:54:33.152132668 -0500
+@@ -120,11 +120,15 @@ getouraddr()
+ struct quehead_32 {
+       u_int32_t qh_link;
+       u_int32_t qh_rlink;
+ };
+
++#ifdef __GNUC_GNU_INLINE__
+ inline void
++#else
++extern inline void
++#endif
+ insque_32(a, b)
+       void *a;
+       void *b;
+ {
+       register struct quehead_32 *element = (struct quehead_32 *) a;
+@@ -134,11 +134,15 @@ insque_32(a, b)
+       element->qh_rlink = (u_int32_t)head;
+       ((struct quehead_32 *)(element->qh_link))->qh_rlink
+       = (u_int32_t)element;
+ }
+ 
++#ifdef __GNUC_GNU_INLINE__
+ inline void
++#else
++extern inline void
++#endif
+ remque_32(void *a)
+ {
+       register struct quehead_32 *element = (struct quehead_32 *) a;
+       ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink;
+       ((struct quehead_32 *)(element->qh_rlink))->qh_link = element->qh_link;
+@@ -150,11 +150,15 @@ remque_32(void *a)
+ struct quehead {
+       struct quehead *qh_link;
+       struct quehead *qh_rlink;
+ };
+ 
++#ifdef __GNUC_GNU_INLINE__
+ inline void
++#else
++extern inline void
++#endif
+ insque(a, b)
+       void *a, *b;
+ {
+       register struct quehead *element = (struct quehead *) a;
+       register struct quehead *head = (struct quehead *) b;
+@@ -163,11 +163,15 @@ insque(a, b)
+       element->qh_rlink = (struct quehead *)head;
+       ((struct quehead *)(element->qh_link))->qh_rlink
+       = (struct quehead *)element;
+ }
+ 
++#ifdef __GNUC_GNU_INLINE__
+ inline void
++#else
++extern inline void
++#endif
+ remque(a)
+      void *a;
+ {
+   register struct quehead *element = (struct quehead *) a;
+   ((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink;

diff --git a/net-misc/vde/vde-2.2.2-r1.ebuild b/net-misc/vde/vde-2.2.2-r1.ebuild
new file mode 100644
index 0000000..242951d
--- /dev/null
+++ b/net-misc/vde/vde-2.2.2-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic user
+
+MY_P="${PN}2-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, 
bochs, and uml"
+SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
+HOMEPAGE="http://vde.sourceforge.net/";
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+# The slirpvde-buffer-overflow patch was made by Ludwig Nussel and submitted 
upstream at
+# 
http://sourceforge.net/tracker/?func=detail&aid=2138410&group_id=95403&atid=611248
+PATCHES=(
+       "${FILESDIR}/${P}-gcc43.patch"
+       "${FILESDIR}/${P}-slirpvde-buffer-overflow.patch"
+       "${FILESDIR}/${P}-gcc53.patch"
+)
+
+src_prepare() {
+       epatch "${PATCHES[@]}"
+       epatch_user
+}
+
+src_configure() {
+       append-cflags $(test-flags-CC -fno-strict-aliasing)
+       econf
+}
+
+src_install() {
+       emake DESTDIR="${D}" install || die "emake install failed"
+       newinitd "${FILESDIR}"/vde.init vde
+       newconfd "${FILESDIR}"/vde.conf vde
+
+       dodoc INSTALL README
+}
+
+pkg_postinst() {
+       # default group already used in kqemu
+       enewgroup qemu
+       einfo "To start vde automatically add it to the default runlevel:"
+       einfo "# rc-update add vde default"
+       einfo "You need to setup tap0 in /etc/conf.d/net"
+       einfo "To use it as a user be sure to set a group in /etc/conf.d/vde"
+       einfo "Users of the group can then run: $ vdeq qemu -sock 
/var/run/vde.ctl ..other opts"
+}

Reply via email to