--- a/src/hotspot/os/linux/os_linux.inline.hpp Thu Oct 12 01:18:38 2017 +0000
+++ b/src/hotspot/os/linux/os_linux.inline.hpp Mon Sep 18 15:06:28 2017 +0200
@@ -98,6 +98,11 @@
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 @@
return NULL;
} else
return p;
+
+#pragma GCC diagnostic pop
}
inline int os::closedir(DIR *dirp) {