src/hotspot/os/linux/os_linux.inline.hpp
changeset 47621 f5f2a2d13775
parent 47216 71c04702a3d5
child 49957 746229cc1ab0
--- 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) {