Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 517000 Details for
Bug 611418
xfce-extra/xfce4-diskperf-plugin-2.6.1 : devperf.c:69:21: error: 'major' redeclared as different kind of symbol
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch which avoids variables named ‘major’ or ‘minor’
xfce4-diskperf-plugin-2.6.1-work-around-glibc-namespace-pollution.patch (text/plain), 2.14 KB, created by
Nico R.
on 2018-01-28 14:27:01 UTC
(
hide
)
Description:
patch which avoids variables named ‘major’ or ‘minor’
Filename:
MIME Type:
Creator:
Nico R.
Created:
2018-01-28 14:27:01 UTC
Size:
2.14 KB
patch
obsolete
>From: Nico R. <n-roeser@gmx.net> >Date: Sun, 28 Jan 2018 15:15:07 +0100 >Subject: [PATCH] work around glibc namespace pollution > >--- > panel-plugin/devperf.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/panel-plugin/devperf.c b/panel-plugin/devperf.c >index 29bcb87..95d2f0e 100644 >--- a/panel-plugin/devperf.c >+++ b/panel-plugin/devperf.c >@@ -69,7 +69,7 @@ static int DevGetPerfData1 (dev_t p_iDevice, struct devperf_t *p_poPerf) > iMinorNo = minor(p_iDevice); > struct timeval oTimeStamp; > FILE *pF; >- unsigned int major, minor, rsect, wsect, ruse, wuse, use; >+ unsigned int majorNo, minorNo, rsect, wsect, ruse, wuse, use; > int running; > char acStats[128]; > int c, n; >@@ -80,10 +80,10 @@ static int DevGetPerfData1 (dev_t p_iDevice, struct devperf_t *p_poPerf) > return (-1); > } > while (1) { >- n = fscanf (pF, "%u %u", &major, &minor); >+ n = fscanf (pF, "%u %u", &majorNo, &minorNo); > if (n != 2) > goto Error; >- if ((major != iMajorNo) || (minor != iMinorNo)) { >+ if ((majorNo != iMajorNo) || (minorNo != iMinorNo)) { > while ((c = fgetc (pF)) && (c != '\n')); /* Goto next line */ > continue; > } >@@ -126,7 +126,7 @@ static int DevGetPerfData2 (dev_t p_iDevice, struct devperf_t *p_poPerf) > iMinorNo = p_iDevice & 0xFF; > struct timeval oTimeStamp; > FILE *pF; >- unsigned int major, minor, rsect, wsect, ruse, wuse, use; >+ unsigned int majorNo, minorNo, rsect, wsect, ruse, wuse, use; > int running; > int c, n; > >@@ -138,9 +138,9 @@ static int DevGetPerfData2 (dev_t p_iDevice, struct devperf_t *p_poPerf) > while ((c = fgetc (pF)) && (c != '\n')); /* Skip the header line */ > while ((n = fscanf (pF, > "%u %u %*u %*s %*u %*u %u %u %*u %*u %u %u %d %u %*u", >- &major, &minor, &rsect, &ruse, &wsect, >+ &majorNo, &minorNo, &rsect, &ruse, &wsect, > &wuse, &running, &use)) == 8) >- if ((major == iMajorNo) && (minor == iMinorNo)) { >+ if ((majorNo == iMajorNo) && (minorNo == iMinorNo)) { > fclose (pF); > gettimeofday (&oTimeStamp, 0); > p_poPerf->timestamp_ns = >-- >2.16.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 611418
:
465764
|
465766
|
465768
|
465770
|
465772
|
465774
|
465776
|
516996
|
516998
| 517000