Bug 1365576

Summary: problem with /usr/include/dirent.h?
Product: [Fedora] Fedora Reporter: Tomasz Kłoczko <kloczko.tomasz>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: arjun, codonell, dj, fweimer, jakub, law, mfabian, pfrankli, schwab, siddhesh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-09 15:25:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomasz Kłoczko 2016-08-09 15:07:45 UTC
Description of problem:

Just been trying to rebuild mysql 5.7.1{3,4} on current Fedora rawhide.
Compilation seems it fails in myisam support:

[  7%] Building C object mysys/CMakeFiles/mysys.dir/my_lib.c.o
cd /home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/debug/mysys && /usr/bin/cc  -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/debug/include -I/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/extra/rapidjson/include -I/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/debug/libbinlogevents/include -I/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/libbinlogevents/export -I/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/include -I/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/mysys  -g -pipe -Wall -Werror=format-security   -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fPIC -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -Werror -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DENABLED_DEBUG_SYNC   -o CMakeFiles/mysys.dir/my_lib.c.o   -c /home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/mysys/my_lib.c
/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/mysys/my_lib.c: In function 'my_dir':
/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/mysys/my_lib.c:127:3: error: 'readdir_r' is deprecated [-Werror=deprecated-declarations]
   while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
   ^~~~~
In file included from /usr/include/features.h:368:0,
                 from /usr/include/stdio.h:27,
                 from /home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/include/my_global.h:41,
                 from /home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/mysys/mysys_priv.h:19,
                 from /home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/mysys/my_lib.c:19:
/usr/include/dirent.h:189:12: note: declared here
 extern int __REDIRECT (readdir_r,
            ^
cc1: all warnings being treated as errors

Version-Release number of selected component (if applicable):


How reproducible:
Try to compile something using <dirent.h>

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jakub Jelinek 2016-08-09 15:10:15 UTC
glibc64 is not what you think.

Comment 2 Florian Weimer 2016-08-09 15:25:12 UTC
/home/tkloczko/rpmbuild/BUILD/mysql-5.7.14/mysql-5.7.14/mysys/my_lib.c:127:3: error: 'readdir_r' is deprecated [-Werror=deprecated-declarations]

Please stop using readdir_r, it's completely useless.