Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: xfce-extra/xfce4-diskperf-plugin/files/, xfce-extra/xfce4-diskperf-plugin/
Date: Fri, 04 May 2018 17:57:41
Message-Id: 1525456635.a78bbc4236ed08c205b57be153c900f9f6e7d32c.dilfridge@gentoo
1 commit: a78bbc4236ed08c205b57be153c900f9f6e7d32c
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 4 17:57:15 2018 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri May 4 17:57:15 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a78bbc42
7
8 xfce-extra/xfce4-diskperf-plugin: Add patch to avoid name clash, bug 611418
9
10 Patch by Nico R.
11
12 Closes: https://bugs.gentoo.org/611418
13 Package-Manager: Portage-2.3.31, Repoman-2.3.9
14
15 .../xfce4-diskperf-plugin-2.6.1-majorminor.patch | 58 ++++++++++++++++++++++
16 .../xfce4-diskperf-plugin-2.6.1.ebuild | 2 +
17 2 files changed, 60 insertions(+)
18
19 diff --git a/xfce-extra/xfce4-diskperf-plugin/files/xfce4-diskperf-plugin-2.6.1-majorminor.patch b/xfce-extra/xfce4-diskperf-plugin/files/xfce4-diskperf-plugin-2.6.1-majorminor.patch
20 new file mode 100644
21 index 00000000000..c0515f1558b
22 --- /dev/null
23 +++ b/xfce-extra/xfce4-diskperf-plugin/files/xfce4-diskperf-plugin-2.6.1-majorminor.patch
24 @@ -0,0 +1,58 @@
25 +From: Nico R. <n-roeser@×××.net>
26 +Date: Sun, 28 Jan 2018 15:15:07 +0100
27 +Subject: [PATCH] work around glibc namespace pollution
28 +
29 +---
30 + panel-plugin/devperf.c | 12 ++++++------
31 + 1 file changed, 6 insertions(+), 6 deletions(-)
32 +
33 +diff --git a/panel-plugin/devperf.c b/panel-plugin/devperf.c
34 +index 29bcb87..95d2f0e 100644
35 +--- a/panel-plugin/devperf.c
36 ++++ b/panel-plugin/devperf.c
37 +@@ -69,7 +69,7 @@ static int DevGetPerfData1 (dev_t p_iDevice, struct devperf_t *p_poPerf)
38 + iMinorNo = minor(p_iDevice);
39 + struct timeval oTimeStamp;
40 + FILE *pF;
41 +- unsigned int major, minor, rsect, wsect, ruse, wuse, use;
42 ++ unsigned int majorNo, minorNo, rsect, wsect, ruse, wuse, use;
43 + int running;
44 + char acStats[128];
45 + int c, n;
46 +@@ -80,10 +80,10 @@ static int DevGetPerfData1 (dev_t p_iDevice, struct devperf_t *p_poPerf)
47 + return (-1);
48 + }
49 + while (1) {
50 +- n = fscanf (pF, "%u %u", &major, &minor);
51 ++ n = fscanf (pF, "%u %u", &majorNo, &minorNo);
52 + if (n != 2)
53 + goto Error;
54 +- if ((major != iMajorNo) || (minor != iMinorNo)) {
55 ++ if ((majorNo != iMajorNo) || (minorNo != iMinorNo)) {
56 + while ((c = fgetc (pF)) && (c != '\n')); /* Goto next line */
57 + continue;
58 + }
59 +@@ -126,7 +126,7 @@ static int DevGetPerfData2 (dev_t p_iDevice, struct devperf_t *p_poPerf)
60 + iMinorNo = p_iDevice & 0xFF;
61 + struct timeval oTimeStamp;
62 + FILE *pF;
63 +- unsigned int major, minor, rsect, wsect, ruse, wuse, use;
64 ++ unsigned int majorNo, minorNo, rsect, wsect, ruse, wuse, use;
65 + int running;
66 + int c, n;
67 +
68 +@@ -138,9 +138,9 @@ static int DevGetPerfData2 (dev_t p_iDevice, struct devperf_t *p_poPerf)
69 + while ((c = fgetc (pF)) && (c != '\n')); /* Skip the header line */
70 + while ((n = fscanf (pF,
71 + "%u %u %*u %*s %*u %*u %u %u %*u %*u %u %u %d %u %*u",
72 +- &major, &minor, &rsect, &ruse, &wsect,
73 ++ &majorNo, &minorNo, &rsect, &ruse, &wsect,
74 + &wuse, &running, &use)) == 8)
75 +- if ((major == iMajorNo) && (minor == iMinorNo)) {
76 ++ if ((majorNo == iMajorNo) && (minorNo == iMinorNo)) {
77 + fclose (pF);
78 + gettimeofday (&oTimeStamp, 0);
79 + p_poPerf->timestamp_ns =
80 +--
81 +2.16.1
82 +
83
84 diff --git a/xfce-extra/xfce4-diskperf-plugin/xfce4-diskperf-plugin-2.6.1.ebuild b/xfce-extra/xfce4-diskperf-plugin/xfce4-diskperf-plugin-2.6.1.ebuild
85 index ebebf441233..54497d9226f 100644
86 --- a/xfce-extra/xfce4-diskperf-plugin/xfce4-diskperf-plugin-2.6.1.ebuild
87 +++ b/xfce-extra/xfce4-diskperf-plugin/xfce4-diskperf-plugin-2.6.1.ebuild
88 @@ -23,6 +23,8 @@ DEPEND="${RDEPEND}
89
90 DOCS=( AUTHORS ChangeLog NEWS README )
91
92 +PATCHES=( "${FILESDIR}/${P}-majorminor.patch" )
93 +
94 pkg_preinst() {
95 gnome2_icon_savelist
96 }