# HG changeset patch # User ehelin # Date 1505739988 -7200 # Node ID f5f2a2d137759a5b764d0923caaf5bf75226d533 # Parent 39575526c6d983e8a26cf43b98b9f62a994209dc 8187667: Disable deprecation warning for readdir_r Reviewed-by: dholmes, sjohanss diff -r 39575526c6d9 -r f5f2a2d13775 src/hotspot/os/linux/os_linux.inline.hpp --- 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) {