mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8187667: Disable deprecation warning for readdir_r
Reviewed-by: dholmes, sjohanss
This commit is contained in:
parent
0a9e773af2
commit
3f2081a618
1 changed files with 7 additions and 0 deletions
|
@ -98,6 +98,11 @@ inline int os::ftruncate(int fd, jlong length) {
|
||||||
|
|
||||||
inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
|
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;
|
dirent* p;
|
||||||
int status;
|
int status;
|
||||||
assert(dirp != NULL, "just checking");
|
assert(dirp != NULL, "just checking");
|
||||||
|
@ -111,6 +116,8 @@ inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
|
||||||
return NULL;
|
return NULL;
|
||||||
} else
|
} else
|
||||||
return p;
|
return p;
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int os::closedir(DIR *dirp) {
|
inline int os::closedir(DIR *dirp) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue