Contents of /trunk/networkmanager/patches/networkmanager-0.9.4.0-linux-libc-headers.patch
Parent Directory | Revision Log
Revision 1824 -
(show annotations)
(download)
Fri Jun 29 12:48:31 2012 UTC (12 years, 3 months ago) by niro
File size: 1538 byte(s)
Fri Jun 29 12:48:31 2012 UTC (12 years, 3 months ago) by niro
File size: 1538 byte(s)
-added patch to fix build against newer linux headers
1 | From 6b64e4db2f3c9cfc0e0e240cf0bc58f3b3e90c1f Mon Sep 17 00:00:00 2001 |
2 | From: Jiří Klimeš <jklimes@redhat.com> |
3 | Date: Wed, 28 Mar 2012 14:42:24 +0000 |
4 | Subject: ppp: don't use struct ifpppstatsreq that was removed from linux/ip_ppp.h |
5 | |
6 | in recent kernels. |
7 | |
8 | We can use ifreq and ppp_stats structures separately. They needn't have to |
9 | to be packed in a structure. |
10 | --- |
11 | (limited to 'src/ppp-manager/nm-ppp-manager.c') |
12 | |
13 | diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c |
14 | index 59698c3..243d2e1 100644 |
15 | --- a/src/ppp-manager/nm-ppp-manager.c |
16 | +++ b/src/ppp-manager/nm-ppp-manager.c |
17 | @@ -304,18 +304,20 @@ monitor_cb (gpointer user_data) |
18 | { |
19 | NMPPPManager *manager = NM_PPP_MANAGER (user_data); |
20 | NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager); |
21 | - struct ifpppstatsreq req; |
22 | + struct ifreq req; |
23 | + struct ppp_stats stats; |
24 | |
25 | memset (&req, 0, sizeof (req)); |
26 | - req.stats_ptr = (caddr_t) &req.stats; |
27 | + memset (&stats, 0, sizeof (stats)); |
28 | + req.ifr_data = (caddr_t) &stats; |
29 | |
30 | - strncpy (req.ifr__name, priv->ip_iface, sizeof (req.ifr__name)); |
31 | + strncpy (req.ifr_name, priv->ip_iface, sizeof (req.ifr_name)); |
32 | if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) { |
33 | nm_log_warn (LOGD_PPP, "could not read ppp stats: %s", strerror (errno)); |
34 | } else { |
35 | g_signal_emit (manager, signals[STATS], 0, |
36 | - req.stats.p.ppp_ibytes, |
37 | - req.stats.p.ppp_obytes); |
38 | + stats.p.ppp_ibytes, |
39 | + stats.p.ppp_obytes); |
40 | } |
41 | |
42 | return TRUE; |
43 | -- |
44 | cgit v0.9.0.2-2-gbebe |