Details

    • Improvement
    • Resolution: Fixed
    • Major
    • Lustre 2.10.0
    • None
    • None
    • 9223372036854775807

    Description

      Trying to build Lustre on Fedora 25 I got hit by this:

      lhsmtool_posix.c: In function Бct_import_recurseБ:
      lhsmtool_posix.c:1499:3: error: Бreaddir_rБ is deprecated [-Werror=deprecated-de
      clarations]
         rc = readdir_r(dir, &ent, &cookie);
         ^~
      In file included from /usr/include/features.h:368:0,
                       from /usr/include/stdio.h:27,
                       from lhsmtool_posix.c:40:
      /usr/include/dirent.h:189:12: note: declared here
       extern int __REDIRECT (readdir_r,
                  ^
      lhsmtool_posix.c: In function Бct_dir_level_maxБ:
      lhsmtool_posix.c:1710:2: error: Бreaddir_rБ is deprecated [-Werror=deprecated-declarations]
        while ((rc = readdir_r(dir, &ent, &cookie)) == 0) {
        ^~~~~
      In file included from /usr/include/features.h:368:0,
                       from /usr/include/stdio.h:27,
                       from lhsmtool_posix.c:40:
      /usr/include/dirent.h:189:12: note: declared here
       extern int __REDIRECT (readdir_r,
                  ^
      

      man readdir_r on my Fedora25 system says that modern posix does not guarantee thread-safedness of readdir, bug glibc and other modern implementation versions of readdir are safe as long as you give it different input streams.

      Attachments

        Activity

          [LU-9137] readdir_r is deprecated now
          pjones Peter Jones added a comment -

          Landed for 2.10

          pjones Peter Jones added a comment - Landed for 2.10

          Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/27276/
          Subject: LU-9137 utils: replace readdir_r with readdir
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 76b1fd6596e62cfb6a2543240db8d0823c1a1465

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/27276/ Subject: LU-9137 utils: replace readdir_r with readdir Project: fs/lustre-release Branch: master Current Patch Set: Commit: 76b1fd6596e62cfb6a2543240db8d0823c1a1465

          James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/27276
          Subject: LU-9137 utils: replace readdir_r with readdir
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: bcba6161f4eb8bdb739f363d1a6bc90d19fe649d

          gerrit Gerrit Updater added a comment - James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/27276 Subject: LU-9137 utils: replace readdir_r with readdir Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: bcba6161f4eb8bdb739f363d1a6bc90d19fe649d

          The same problem happens in builds on Ubuntu 17.

          bogl Bob Glossman (Inactive) added a comment - The same problem happens in builds on Ubuntu 17.

          People

            simmonsja James A Simmons
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: