[Goodies-dev] [Bug 13940] New: diskperf-plugin: missing <sys/sysmacros.h> include (fails to build w/ glibc-2.25+)

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sat Oct 21 00:16:54 CEST 2017


https://bugzilla.xfce.org/show_bug.cgi?id=13940

            Bug ID: 13940
           Summary: diskperf-plugin: missing <sys/sysmacros.h> include
                    (fails to build w/ glibc-2.25+)
    Classification: Panel Plugins
           Product: Xfce4-diskperf-plugin
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: General
          Assignee: goodies-dev at xfce.org
          Reporter: mgorny at gentoo.org
        QA Contact: goodies-dev at xfce.org
  Target Milestone: ---

Created attachment 7377
  --> https://bugzilla.xfce.org/attachment.cgi?id=7377&action=edit
0001-Add-sys-sysmacros.h-include-required-for-glibc-2.25.patch

When building against glibc-2.25+:

devperf.c: In function ‘DevGetPerfData1’:
devperf.c:65:32: warning: implicit declaration of function ‘major’
[-Wimplicit-function-declaration]
     const int       iMajorNo = major(p_iDevice),
                                ^
devperf.c:66:13: warning: implicit declaration of function ‘minor’
[-Wimplicit-function-declaration]
  iMinorNo = minor(p_iDevice);
             ^
devperf.c:69:21: error: ‘major’ redeclared as different kind of symbol
     unsigned int    major, minor, rsect, wsect, ruse, wuse, use;
                     ^
devperf.c:65:32: note: previous implicit declaration of ‘major’ was here
     const int       iMajorNo = major(p_iDevice),
                                ^
devperf.c:69:28: error: ‘minor’ redeclared as different kind of symbol
     unsigned int    major, minor, rsect, wsect, ruse, wuse, use;
                            ^
devperf.c:66:13: note: previous implicit declaration of ‘minor’ was here
  iMinorNo = minor(p_iDevice);
             ^
devperf.c:87:2: warning: ignoring return value of ‘fscanf’, declared with
attribute warn_unused_result [-Wunused-result]
  fscanf (pF, "%*s"); /* Skip device name */
  ^


This version of glibc no longer implicitly includes major/minor macros via
other headers. It requires using <sys/sysmacros.h> for that explicitly (it also
works on BSD). I'm attaching a patch fixing the issue.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the Goodies-dev mailing list