From fadd84ba2896a358c49bf0a514700a08e6622cc9 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 2 Sep 2021 18:58:01 +1000 Subject: [PATCH] Correct pthread library name in find_library() ctypes.util.find_library() does not require the "lib" prefix, and may throw an exception depending on the environment, so drop the prefix when finding it. --- tests/debugpy/test_threads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/debugpy/test_threads.py b/tests/debugpy/test_threads.py index e5b890366..5089e5f0d 100644 --- a/tests/debugpy/test_threads.py +++ b/tests/debugpy/test_threads.py @@ -170,7 +170,7 @@ def foo(x): from ctypes import CDLL, CFUNCTYPE, byref, c_void_p, c_ulong from ctypes.util import find_library - libpthread = CDLL(find_library("libpthread")) + libpthread = CDLL(find_library("pthread")) thread_func_p = CFUNCTYPE(c_void_p, c_void_p) thread_func = thread_func_p( foo