JDK-8315506 : C99 compatibility issue in LinuxNativeDispatcher
  • Type: Bug
  • Component: core-libs
  • Affected Version: openjdk8u402
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2023-09-01
  • Updated: 2025-06-23
  • Resolved: 2023-09-04
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.
Other
openjdk8u402,shenandoah8u402 openjdk8u402,shenandoah8u402
Fixed
Related Reports
Relates :  
Description
The Java_sun_nio_fs_LinuxNativeDispatcher_getlinelen function calls the free function without including <stdlib.h>. This results in an implicit function declarations, and some compilers no longer support that by default, leading to a build failure.

Per the comment in the file, this function was introduced in the backport of JDK-8229872 from JDK 11, so this bug is specific to jdk8u.

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

Comments
Changeset: 89a08b38 Author: Florian Weimer <fweimer@openjdk.org> Committer: Severin Gehwolf <sgehwolf@openjdk.org> Date: 2023-09-04 10:33:34 +0000 URL: https://git.openjdk.org/jdk8u/commit/89a08b389947078ae150a758c1ff9da7ba404857
01-11-2023

Changeset: 89a08b38 Author: Florian Weimer <fweimer@openjdk.org> Committer: Severin Gehwolf <sgehwolf@openjdk.org> Date: 2023-09-04 10:33:34 +0000 URL: https://git.openjdk.org/jdk8u-dev/commit/89a08b389947078ae150a758c1ff9da7ba404857
04-09-2023

This is desirable to fix because it avoids build failures with future toolchain versions and in future distribution build environments. See the Fedora links from the description for some background why we are doing this.
01-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk8u-dev/pull/362 Date: 2023-09-01 10:12:18 +0000
01-09-2023