Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-9832

minor()/major()/makedev() maro use problems with newer gcc

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.11.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      building Lustre tools on Fedora 26 I am getting this warning now:

      mcreate.c:82:13: error: In the GNU C Library, "minor" is defined
       by <sys/sysmacros.h>. For historical compatibility, it is
       currently defined by <sys/types.h> as well, but we plan to
       remove this soon. To use "minor", include <sys/sysmacros.h>
       directly. If you did not intend to use a system-defined macro
       "minor", you should undefine it after including <sys/types.h>. [-Werror]
                               dev = makedev(strtoul(optarg, NULL, 0), minor(dev));
                   ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                               mcreate.c:82:13: error: In the GNU C Library, "makedev" is defined
       by <sys/sysmacros.h>. For historical compatibility, it is
       currently defined by <sys/types.h> as well, but we plan to
       remove this soon. To use "makedev", include <sys/sysmacros.h>
       directly. If you did not intend to use a system-defined macro
       "makedev", you should undefine it after including <sys/types.h>. [-Werror]
                               dev = makedev(strtoul(optarg, NULL, 0), minor(dev));
                   ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                               mcreate.c:85:13: error: In the GNU C Library, "major" is defined
       by <sys/sysmacros.h>. For historical compatibility, it is
       currently defined by <sys/types.h> as well, but we plan to
       remove this soon. To use "major", include <sys/sysmacros.h>
       directly. If you did not intend to use a system-defined macro
       "major", you should undefine it after including <sys/types.h>. [-Werror]
                               dev = makedev(major(dev), strtoul(optarg, NULL, 0));
                   ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                               

      Attachments

        Activity

          [LU-9832] minor()/major()/makedev() maro use problems with newer gcc

          Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33161
          Subject: LU-9832 tests: Use sys/sysmacros.h for major/minor/makedev
          Project: fs/lustre-release
          Branch: b2_10
          Current Patch Set: 1
          Commit: 02b50a67351e54a7f4563f27363601c2d1cea341

          gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33161 Subject: LU-9832 tests: Use sys/sysmacros.h for major/minor/makedev Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: 02b50a67351e54a7f4563f27363601c2d1cea341
          pjones Peter Jones added a comment -

          Landed for 2.11

          pjones Peter Jones added a comment - Landed for 2.11

          Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28360/
          Subject: LU-9832 tests: Use sys/sysmacros.h for major/minor/makedev
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 650b7450b612943e7ade76434c3be70b06f58f58

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28360/ Subject: LU-9832 tests: Use sys/sysmacros.h for major/minor/makedev Project: fs/lustre-release Branch: master Current Patch Set: Commit: 650b7450b612943e7ade76434c3be70b06f58f58

          Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/28360
          Subject: LU-9832 tests: Use sys/sysmacros.h for major/minor/makedev
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: fc59e7db2aa02874c64e27de02402a47592846b8

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/28360 Subject: LU-9832 tests: Use sys/sysmacros.h for major/minor/makedev Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: fc59e7db2aa02874c64e27de02402a47592846b8

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: