Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14469

build with cmake -DMYSQL_MAINTAINER_MODE=ON fails: 'readdir_r' is deprecated

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL)
    • 5.5.59, 10.0.34, 10.1.31, 10.2.13
    • Compiling
    • None
    • 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux ; gcc (Debian 4.9.2-10) 4.9.2 ; cmake version 3.0.2

    Description

      cmake -DMYSQL_MAINTAINER_MODE=ON .
      

      5.5 9b53e541f03d74e

      /data/src/5.5-mdev7457/mysys/my_lib.c: In function 'my_dir':
      /data/src/5.5-mdev7457/mysys/my_lib.c:140:3: error: 'readdir_r' is deprecated (declared at /usr/include/dirent.h:189) [-Werror=deprecated-declarations]
         while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
         ^
      cc1: all warnings being treated as errors
      mysys/CMakeFiles/mysys.dir/build.make:1296: recipe for target 'mysys/CMakeFiles/mysys.dir/my_lib.c.o' failed
      make[2]: *** [mysys/CMakeFiles/mysys.dir/my_lib.c.o] Error 1
      CMakeFiles/Makefile2:6521: recipe for target 'mysys/CMakeFiles/mysys.dir/all' failed
      make[1]: *** [mysys/CMakeFiles/mysys.dir/all] Error 2
      Makefile:147: recipe for target 'all' failed
      make: *** [all] Error 2
      

      Attachments

        Activity

          There's no need to protect readdir() with mutexes anymore:

          1. innodb doesn't do it
          2. perhaps it was needed on ancient glibc that did not have readdir_r(). But we don't support this glibc anymore, in all buildbot logs (I've grepped all the 44000 of them) readir_r() was found, including centos5, debian5, hardy, labrador and solaris sparc.
          serg Sergei Golubchik added a comment - There's no need to protect readdir() with mutexes anymore: innodb doesn't do it perhaps it was needed on ancient glibc that did not have readdir_r() . But we don't support this glibc anymore, in all buildbot logs (I've grepped all the 44000 of them) readir_r() was found, including centos5, debian5, hardy, labrador and solaris sparc.

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.