[MDEV-14469] build with cmake -DMYSQL_MAINTAINER_MODE=ON fails: 'readdir_r' is deprecated Created: 2017-11-22  Updated: 2018-01-15  Resolved: 2018-01-15

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 5.5
Fix Version/s: 5.5.59, 10.0.34, 10.1.31, 10.2.13

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

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



 Comments   
Comment by Sergei Golubchik [ 2018-01-15 ]

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.
Generated at Thu Feb 08 08:13:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.