Patchwork [meta-oe/meta-xfce,5/7] networkmanager: unbreak build with latest kernel headers

login
register
mail settings
Submitter Andreas Müller
Date Sept. 17, 2012, 8:15 a.m.
Message ID <1347869747-14271-6-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/36579/
State Accepted
Headers show

Comments

Andreas Müller - Sept. 17, 2012, 8:15 a.m.
| nm-ppp-manager.c: In function 'monitor_cb':
| nm-ppp-manager.c:307:23: error: storage size of 'req' isn't known
| make[5]: *** [libppp_manager_la-nm-ppp-manager.lo] Error 1

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 ...se-struct-ifpppstatsreq-that-was-removed-.patch |   48 ++++++++++++++++++++
 .../networkmanager/networkmanager_0.9.2.0.bb       |    3 +-
 2 files changed, 50 insertions(+), 1 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-ppp-don-t-use-struct-ifpppstatsreq-that-was-removed-.patch

Patch

diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-ppp-don-t-use-struct-ifpppstatsreq-that-was-removed-.patch b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-ppp-don-t-use-struct-ifpppstatsreq-that-was-removed-.patch
new file mode 100644
index 0000000..e2f43f3
--- /dev/null
+++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-ppp-don-t-use-struct-ifpppstatsreq-that-was-removed-.patch
@@ -0,0 +1,48 @@ 
+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 7/9] 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.
+---
+Upstream-Status: Backport [1]
+[1] http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=6b64e4db2f3c9cfc0e0e240cf0bc58f3b3e90c1f
+ src/ppp-manager/nm-ppp-manager.c |   12 +++++++-----
+ 1 file 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.9.4
diff --git a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
index e774cb9..074e665 100644
--- a/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
+++ b/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb
@@ -4,13 +4,14 @@  SECTION = "net/misc"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b"
 
-PR = "r7"
+PR = "r8"
 
 DEPENDS = "libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp"
 inherit gnome gettext
 
 SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.bz2 \
     file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
+    file://0002-ppp-don-t-use-struct-ifpppstatsreq-that-was-removed-.patch \
     file://gtk-doc.make \
 "
 SRC_URI[md5sum] = "bc0b00b8a187762d93c50a9706b4c5c3"