diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-05-24 03:04:31 +0000 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-05-24 03:04:31 +0000 |
commit | 423a1987ffe1d82382179ba17a66b4b48f34ad04 (patch) | |
tree | 92ae54789ef1122b5babdd6988d46dbd15566029 /net-misc | |
parent | Fix building with recent toolchain (missing #include <cstdlib> for function "... (diff) | |
download | gentoo-2-423a1987ffe1d82382179ba17a66b4b48f34ad04.tar.gz gentoo-2-423a1987ffe1d82382179ba17a66b4b48f34ad04.tar.bz2 gentoo-2-423a1987ffe1d82382179ba17a66b4b48f34ad04.zip |
Fix building against linux-headers-3.4 (bug #417055, thanks to Marek Bartosiewicz, Adrian Frith, Xake et al.).
(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
6 files changed, 67 insertions, 5 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog index ef33eb79663e..aa15c4386377 100644 --- a/net-misc/networkmanager/ChangeLog +++ b/net-misc/networkmanager/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/networkmanager # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.133 2012/05/05 03:20:42 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.134 2012/05/24 03:04:31 tetromino Exp $ + + 24 May 2012; Alexandre Rostovtsev <tetromino@gentoo.org> + networkmanager-0.8.4.0-r2.ebuild, networkmanager-0.9.0.ebuild, + networkmanager-0.9.2.0-r5.ebuild, networkmanager-0.9.4.0-r2.ebuild, + +files/networkmanager-0.9.4.0-ip_ppp.h.patch: + Fix building against linux-headers-3.4 (bug #417055, thanks to Marek + Bartosiewicz, Adrian Frith, Xake et al.). 05 May 2012; Jeff Horelick <jdhore@gentoo.org> networkmanager-0.8-r1.ebuild, networkmanager-0.8.4.0-r2.ebuild, networkmanager-0.9.0.ebuild, diff --git a/net-misc/networkmanager/files/networkmanager-0.9.4.0-ip_ppp.h.patch b/net-misc/networkmanager/files/networkmanager-0.9.4.0-ip_ppp.h.patch new file mode 100644 index 000000000000..b4fb071fc20a --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-0.9.4.0-ip_ppp.h.patch @@ -0,0 +1,47 @@ +From 6b64e4db2f3c9cfc0e0e240cf0bc58f3b3e90c1f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com> +Date: Wed, 28 Mar 2012 16:42:24 +0200 +Subject: [PATCH] ppp: don't use struct ifpppstatsreq that was removed from + linux/ip_ppp.h + +in recent kernels. + +We can use ifreq and ppp_stats structures separately. They needn't have to +to be packed in a structure. +--- + src/ppp-manager/nm-ppp-manager.c | 12 +++++++----- + 1 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c +index 59698c3..243d2e1 100644 +--- a/src/ppp-manager/nm-ppp-manager.c ++++ b/src/ppp-manager/nm-ppp-manager.c +@@ -304,18 +304,20 @@ monitor_cb (gpointer user_data) + { + NMPPPManager *manager = NM_PPP_MANAGER (user_data); + NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager); +- struct ifpppstatsreq req; ++ struct ifreq req; ++ struct ppp_stats stats; + + memset (&req, 0, sizeof (req)); +- req.stats_ptr = (caddr_t) &req.stats; ++ memset (&stats, 0, sizeof (stats)); ++ req.ifr_data = (caddr_t) &stats; + +- strncpy (req.ifr__name, priv->ip_iface, sizeof (req.ifr__name)); ++ strncpy (req.ifr_name, priv->ip_iface, sizeof (req.ifr_name)); + if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) { + nm_log_warn (LOGD_PPP, "could not read ppp stats: %s", strerror (errno)); + } else { + g_signal_emit (manager, signals[STATS], 0, +- req.stats.p.ppp_ibytes, +- req.stats.p.ppp_obytes); ++ stats.p.ppp_ibytes, ++ stats.p.ppp_obytes); + } + + return TRUE; +-- +1.7.8.6 + diff --git a/net-misc/networkmanager/networkmanager-0.8.4.0-r2.ebuild b/net-misc/networkmanager/networkmanager-0.8.4.0-r2.ebuild index 6fb063c446ea..a8eae36e621f 100644 --- a/net-misc/networkmanager/networkmanager-0.8.4.0-r2.ebuild +++ b/net-misc/networkmanager/networkmanager-0.8.4.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.8.4.0-r2.ebuild,v 1.8 2012/05/05 03:20:42 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.8.4.0-r2.ebuild,v 1.9 2012/05/24 03:04:31 tetromino Exp $ EAPI="3" GNOME_ORG_MODULE="NetworkManager" @@ -78,6 +78,8 @@ src_prepare() { epatch "${FILESDIR}/${P}-shared-connection.patch" epatch "${FILESDIR}/${P}-fix-tests.patch" epatch "${FILESDIR}/${P}-ifnet-smarter-write.patch" + # Fix building against linux-headers-3.4, #417055 + epatch "${FILESDIR}/${PN}-0.9.4.0-ip_ppp.h.patch" eautoreconf } diff --git a/net-misc/networkmanager/networkmanager-0.9.0.ebuild b/net-misc/networkmanager/networkmanager-0.9.0.ebuild index 5b25f8698023..02c77a15c0b2 100644 --- a/net-misc/networkmanager/networkmanager-0.9.0.ebuild +++ b/net-misc/networkmanager/networkmanager-0.9.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.0.ebuild,v 1.5 2012/05/05 03:20:42 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.0.ebuild,v 1.6 2012/05/24 03:04:31 tetromino Exp $ EAPI="4" GNOME_ORG_MODULE="NetworkManager" @@ -87,6 +87,8 @@ pkg_pretend() { src_prepare() { # Don't build tests epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch" + # Fix building against linux-headers-3.4, #417055 + epatch "${FILESDIR}/${PN}-0.9.4.0-ip_ppp.h.patch" eautoreconf default } diff --git a/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild b/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild index 76b2f43b6de4..7ef7c66657c1 100644 --- a/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild +++ b/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild,v 1.2 2012/05/05 03:20:42 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.2.0-r5.ebuild,v 1.3 2012/05/24 03:04:31 tetromino Exp $ EAPI="4" GNOME_ORG_MODULE="NetworkManager" @@ -109,6 +109,8 @@ src_prepare() { epatch "${FILESDIR}/${P}-ifnet-password-truncated.patch" # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832 epatch "${FILESDIR}/${P}-pre-sleep.patch" + # Fix building against linux-headers-3.4, #417055 + epatch "${FILESDIR}/${PN}-0.9.4.0-ip_ppp.h.patch" eautoreconf default diff --git a/net-misc/networkmanager/networkmanager-0.9.4.0-r2.ebuild b/net-misc/networkmanager/networkmanager-0.9.4.0-r2.ebuild index b7db1af41fae..96cf2c2f173a 100644 --- a/net-misc/networkmanager/networkmanager-0.9.4.0-r2.ebuild +++ b/net-misc/networkmanager/networkmanager-0.9.4.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.4.0-r2.ebuild,v 1.3 2012/05/05 03:20:42 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.4.0-r2.ebuild,v 1.4 2012/05/24 03:04:31 tetromino Exp $ EAPI="4" GNOME_ORG_MODULE="NetworkManager" @@ -107,6 +107,8 @@ src_prepare() { # Fix uninitialized variables in libnm-glib epatch "${FILESDIR}/${P}-libnm-glib-ensure_inited.patch" epatch "${FILESDIR}/${P}-libnm-glib-init-gerror.patch" + # Fix building against linux-headers-3.4, #417055 + epatch "${FILESDIR}/${P}-ip_ppp.h.patch" eautoreconf default |