Mercurial > hg > openjdk > jdk7u > hotspot
changeset 5810:66e04addced6 jdk7u171-b00
8187667: Disable deprecation warning for readdir_r
Summary: Rollback 8179887 fix in favour of more specific upstream fix
Reviewed-by: dholmes, sjohanss
author | ehelin |
---|---|
date | Mon, 05 Feb 2018 20:10:44 +0000 |
parents | cadc37101c4f |
children | e5c2b8ac6e28 |
files | make/linux/makefiles/gcc.make src/os/linux/vm/os_linux.inline.hpp |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/make/linux/makefiles/gcc.make Mon Feb 05 10:15:57 2018 +0000 +++ b/make/linux/makefiles/gcc.make Mon Feb 05 20:10:44 2018 +0000 @@ -149,7 +149,6 @@ else ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare endif -ACCEPTABLE_WARNINGS += -Wno-deprecated-declarations CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) # Special cases
--- a/src/os/linux/vm/os_linux.inline.hpp Mon Feb 05 10:15:57 2018 +0000 +++ b/src/os/linux/vm/os_linux.inline.hpp Mon Feb 05 20:10:44 2018 +0000 @@ -135,6 +135,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"); @@ -148,6 +153,8 @@ return NULL; } else return p; + +#pragma GCC diagnostic pop } inline int os::closedir(DIR *dirp) {