From c0c4d771922f8fce36f1014e57d7e7a213243891 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 23 May 2023 13:50:58 +0000 Subject: [PATCH] 8308544: Fix compilation regression from JDK-8306983 on musl libc Reviewed-by: bpb, stuefe --- src/jdk.internal.le/linux/native/lible/CLibrary.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jdk.internal.le/linux/native/lible/CLibrary.cpp b/src/jdk.internal.le/linux/native/lible/CLibrary.cpp index 044d6fa1802..8ce6cf42c26 100644 --- a/src/jdk.internal.le/linux/native/lible/CLibrary.cpp +++ b/src/jdk.internal.le/linux/native/lible/CLibrary.cpp @@ -113,8 +113,8 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibr env->SetIntField(result, c_line, data.c_line); jbyteArray c_ccValue = (jbyteArray) env->GetObjectField(result, c_cc); env->SetByteArrayRegion(c_ccValue, 0, NCCS, (signed char *) data.c_cc);//TODO: cast? - env->SetIntField(result, c_ispeed, data.c_ispeed); - env->SetIntField(result, c_ospeed, data.c_ospeed); + env->SetIntField(result, c_ispeed, cfgetispeed(&data)); + env->SetIntField(result, c_ospeed, cfgetospeed(&data)); } /* @@ -133,8 +133,8 @@ JNIEXPORT void JNICALL Java_jdk_internal_org_jline_terminal_impl_jna_linux_CLibr data.c_line = env->GetIntField(input, c_line); jbyteArray c_ccValue = (jbyteArray) env->GetObjectField(input, c_cc); env->GetByteArrayRegion(c_ccValue, 0, NCCS, (jbyte *) data.c_cc); - data.c_ispeed = env->GetIntField(input, c_ispeed); - data.c_ospeed = env->GetIntField(input, c_ospeed); + cfsetispeed(&data, env->GetIntField(input, c_ispeed)); + cfsetospeed(&data, env->GetIntField(input, c_ospeed)); if (tcsetattr(fd, cmd, &data) != 0) { throw_errno(env);