From 0cc98b7468fe1ee280f61ec8933ea0289b5a330d Mon Sep 17 00:00:00 2001 From: Clive Verghese Date: Wed, 4 Aug 2021 22:06:19 +0000 Subject: [PATCH] Fix LinuxThreads detection in MUSL --- .../src/solaris/native/sun/tools/attach/LinuxVirtualMachine.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jdk/src/solaris/native/sun/tools/attach/LinuxVirtualMachine.c b/src/jdk/src/solaris/native/sun/tools/attach/LinuxVirtualMachine.c index 6017308d0b..a583b4bae8 100644 --- openjdk/jdk/src/solaris/native/sun/tools/attach/LinuxVirtualMachine.c +++ openjdk/jdk/src/solaris/native/sun/tools/attach/LinuxVirtualMachine.c @@ -195,6 +195,9 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_LinuxVirtualMachine_connect JNIEXPORT jboolean JNICALL Java_sun_tools_attach_LinuxVirtualMachine_isLinuxThreads (JNIEnv *env, jclass cls) { +# ifdef MUSL_LIBC + return JNI_FALSE; +# else # ifndef _CS_GNU_LIBPTHREAD_VERSION # define _CS_GNU_LIBPTHREAD_VERSION 3 # endif @@ -222,6 +225,7 @@ JNIEXPORT jboolean JNICALL Java_sun_tools_attach_LinuxVirtualMachine_isLinuxThre res = (jboolean)(strstr(s, "NPTL") == NULL); free(s); return res; +# endif } /*