/[gentoo-x86]/net-misc/networkmanager/files/networkmanager-0.9.4.0-ip_ppp.h.patch
Gentoo

Contents of /net-misc/networkmanager/files/networkmanager-0.9.4.0-ip_ppp.h.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu May 24 03:04:31 2012 UTC (22 months, 3 weeks ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
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)

1 From 6b64e4db2f3c9cfc0e0e240cf0bc58f3b3e90c1f Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
3 Date: Wed, 28 Mar 2012 16:42:24 +0200
4 Subject: [PATCH] ppp: don't use struct ifpppstatsreq that was removed from
5 linux/ip_ppp.h
6
7 in recent kernels.
8
9 We can use ifreq and ppp_stats structures separately. They needn't have to
10 to be packed in a structure.
11 ---
12 src/ppp-manager/nm-ppp-manager.c | 12 +++++++-----
13 1 files changed, 7 insertions(+), 5 deletions(-)
14
15 diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
16 index 59698c3..243d2e1 100644
17 --- a/src/ppp-manager/nm-ppp-manager.c
18 +++ b/src/ppp-manager/nm-ppp-manager.c
19 @@ -304,18 +304,20 @@ monitor_cb (gpointer user_data)
20 {
21 NMPPPManager *manager = NM_PPP_MANAGER (user_data);
22 NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager);
23 - struct ifpppstatsreq req;
24 + struct ifreq req;
25 + struct ppp_stats stats;
26
27 memset (&req, 0, sizeof (req));
28 - req.stats_ptr = (caddr_t) &req.stats;
29 + memset (&stats, 0, sizeof (stats));
30 + req.ifr_data = (caddr_t) &stats;
31
32 - strncpy (req.ifr__name, priv->ip_iface, sizeof (req.ifr__name));
33 + strncpy (req.ifr_name, priv->ip_iface, sizeof (req.ifr_name));
34 if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) {
35 nm_log_warn (LOGD_PPP, "could not read ppp stats: %s", strerror (errno));
36 } else {
37 g_signal_emit (manager, signals[STATS], 0,
38 - req.stats.p.ppp_ibytes,
39 - req.stats.p.ppp_obytes);
40 + stats.p.ppp_ibytes,
41 + stats.p.ppp_obytes);
42 }
43
44 return TRUE;
45 --
46 1.7.8.6

  ViewVC Help
Powered by ViewVC 1.1.20