changeset 47621:f5f2a2d13775

8187667: Disable deprecation warning for readdir_r Reviewed-by: dholmes, sjohanss
author ehelin
date Mon, 18 Sep 2017 15:06:28 +0200
parents 39575526c6d9
children 817f2a7019e4
files src/hotspot/os/linux/os_linux.inline.hpp
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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) {