JDK-8187667 : Disable deprecation warning for readdir_r
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7,8,10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-09-19
  • Updated: 2020-06-22
  • Resolved: 2017-10-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8 Other
10 b31Fixed 8u261Fixed openjdk7uFixed
Related Reports
Relates :  
Relates :  
The function readdir_r has been deprecated in glibc since version 2.24 (see https://sourceware.org/bugzilla/show_bug.cgi?id=19056). Since hotspot wants to be compatible with glibc both older and newer than 2.24, the easiest thing for now is to ignore the warning.

Later, if readdir_r actually gets removed in a future version of glibc, then we might have to fall back to e.g. dlopen to check if readdir_r is present. However, as long as readdir_r is "just" deprecated, then it easier to just disable the warning from gcc.