JDK-8308544 : Fix compilation regression from JDK-8306983 on musl libc
  • Type: Bug
  • Component: tools
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2023-05-22
  • Updated: 2023-05-29
  • Resolved: 2023-05-23
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 21
21 b24Fixed
Related Reports
Duplicate :  
Relates :  
Description
Since JDK-8306983 compilation on Alpine Linux using musl libc:
```
../src/jdk.internal.le/linux/native/lible/CLibrary.cpp: In function 'void Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_tcgetattr(JNIEnv*, jobject, jint, jobject)':
../src/jdk.internal.le/linux/native/lible/CLibrary.cpp:116:45: error: 'struct termios' has no member named 'c_ispeed'; did you mean '__c_ispeed'?
  116 |     env->SetIntField(result, c_ispeed, data.c_ispeed);
      |                                             ^~~~~~~~
      |                                             __c_ispeed
../src/jdk.internal.le/linux/native/lible/CLibrary.cpp:117:45: error: 'struct termios' has no member named 'c_ospeed'; did you mean '__c_ospeed'?
  117 |     env->SetIntField(result, c_ospeed, data.c_ospeed);
      |                                             ^~~~~~~~
      |                                             __c_ospeed
../src/jdk.internal.le/linux/native/lible/CLibrary.cpp: In function 'void Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibraryImpl_tcsetattr(JNIEnv*, jobject, jint, jint, jobject)':
../src/jdk.internal.le/linux/native/lible/CLibrary.cpp:136:10: error: 'struct termios' has no member named 'c_ispeed'; did you mean '__c_ispeed'?
  136 |     data.c_ispeed = env->GetIntField(input, c_ispeed);
      |          ^~~~~~~~
      |          __c_ispeed
../src/jdk.internal.le/linux/native/lible/CLibrary.cpp:137:10: error: 'struct termios' has no member named 'c_ospeed'; did you mean '__c_ospeed'?
   ... (rest of output omitted)
```
Comments
Changeset: c0c4d771 Author: Jan Kratochvil <jkratochvil@openjdk.org> Committer: Thomas Stuefe <stuefe@openjdk.org> Date: 2023-05-23 13:50:58 +0000 URL: https://git.openjdk.org/jdk/commit/c0c4d771922f8fce36f1014e57d7e7a213243891
23-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14080 Date: 2023-05-22 12:46:02 +0000
22-05-2023