Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-5027

Replace readdir_r with readdir

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.2.1, 7.1.0
    • Component/s: Cleanup, Core
    • Labels:
      None
    • Backport to Version:

      Description

      glibc deprecated readdir_r for reasons explained in the man page.

      ../../mgmt/Rollback.cc  -fPIC -DPIC -o .libs/Rollback.o
      ../../mgmt/FileManager.cc: In member function 'SnapResult FileManager::removeSnap(const char*, const char*)':
      ../../mgmt/FileManager.cc:394:10: error: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated [-Werror=deprecated-declarations]
        while (readdir_r(dir, dirEntrySpace, &entryPtr) == 0) {
               ^~~~~~~~~
      In file included from ../../lib/ts/ink_platform.h:130:0,
                      from ../../mgmt/FileManager.cc:24:
      /usr/include/dirent.h:183:12: note: declared here
      extern int readdir_r (DIR *__restrict __dirp,
                 ^~~~~~~~~
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jamespeach James Peach
                Reporter:
                jamespeach James Peach
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h