8187667: Disable deprecation warning for readdir_r
Reviewed-by: dholmes, sjohanss
This commit is contained in:
parent
0a9e773af2
commit
3f2081a618
@ -98,6 +98,11 @@ inline int os::ftruncate(int fd, jlong length) {
|
||||
|
||||
inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
|
||||
{
|
||||
// readdir_r has been deprecated since glibc 2.24.
|
||||
// See https://sourceware.org/bugzilla/show_bug.cgi?id=19056 for more details.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
dirent* p;
|
||||
int status;
|
||||
assert(dirp != NULL, "just checking");
|
||||
@ -111,6 +116,8 @@ inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
|
||||
return NULL;
|
||||
} else
|
||||
return p;
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
inline int os::closedir(DIR *dirp) {
|
||||
|
Loading…
Reference in New Issue
Block a user