XMLWordPrintable

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 6.0.8
    • Build process
    • None
    • ubuntu 16.10

    Description

      14:05:32 /jenkins/workspace/libcouchbase-c5-test/LN/ubuntu-16.10-amd64/HPCC-Platform/system/jlib/jdebug.cpp: In member function ‘void CProcessMonitor::scan()’:
      14:05:32 /jenkins/workspace/libcouchbase-c5-test/LN/ubuntu-16.10-amd64/HPCC-Platform/system/jlib/jdebug.cpp:1507:13: error: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Werror=deprecated-declarations]
      14:05:32 readdir_r(dir, &entryMem, &ent);
      14:05:32 ^~~~~~~~~
      14:05:32 In file included from /usr/include/features.h:364:0,
      14:05:32 from /usr/include/endian.h:21,
      14:05:32 from /jenkins/workspace/libcouchbase-c5-test/LN/ubuntu-16.10-amd64/HPCC-Platform/system/jlib/../../system/include/platform.h:77,
      14:05:32 from /jenkins/workspace/libcouchbase-c5-test/LN/ubuntu-16.10-amd64/HPCC-Platform/system/jlib/jdebug.cpp:18:
      14:05:32 /usr/include/dirent.h:189:12: note: declared here
      14:05:32 extern int __REDIRECT (readdir_r,
      14:05:32 ^
      14:05:32 /jenkins/workspace/libcouchbase-c5-test/LN/ubuntu-16.10-amd64/HPCC-Platform/system/jlib/jdebug.cpp:1507:43: error: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Werror=deprecated-declarations]
      14:05:32 readdir_r(dir, &entryMem, &ent);
      14:05:32 ^
      14:05:32 In file included from /usr/include/features.h:364:0,
      14:05:32 from /usr/include/endian.h:21,
      14:05:32 from /jenkins/workspace/libcouchbase-c5-test/LN/ubuntu-16.10-amd64/HPCC-Platform/system/jlib/../../system/include/platform.h:77,
      14:05:32 from /jenkins/workspace/libcouchbase-c5-test/LN/ubuntu-16.10-amd64/HPCC-Platform/system/jlib/jdebug.cpp:18:
      14:05:32 /usr/include/dirent.h:189:12: note: declared here
      14:05:32 extern int __REDIRECT (readdir_r,
      14:05:32 ^

      Man page says we should swap over to using readdir()

      • In the current POSIX.1 specification (POSIX.1-2008), readdir(3) is
        not required to be thread-safe. However, in modern
        implementations (including the glibc implementation), concurrent
        calls to readdir(3) that specify different directory streams are
        thread-safe. Therefore, the use of readdir_r() is generally
        unnecessary in multithreaded programs. In cases where multiple
        threads must read from the same directory stream, using readdir(3)
        with external synchronization is still preferable to the use of
        readdir_r(), for the reasons given in the points above.
      • It is expected that a future version of POSIX.1 will make
        readdir_r() obsolete, and require that readdir(3) be thread-safe
        when concurrently employed on different directory streams.

      Attachments

        Activity

          People

            Michael-Gardner Michael Gardner
            Michael-Gardner Michael Gardner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: