Binary files petsc-3.22.0.orig/config/BuildSystem/config/101p/libpthread.a and petsc-3.22.0/config/BuildSystem/config/101p/libpthread.a differ
Binary files petsc-3.22.0.orig/config/BuildSystem/config/101p/libpthread.dll.a and petsc-3.22.0/config/BuildSystem/config/101p/libpthread.dll.a differ
Binary files petsc-3.22.0.orig/config/BuildSystem/config/101p/libwinpthread.a and petsc-3.22.0/config/BuildSystem/config/101p/libwinpthread.a differ
Binary files petsc-3.22.0.orig/config/BuildSystem/config/101p/libwinpthread.dll.a and petsc-3.22.0/config/BuildSystem/config/101p/libwinpthread.dll.a differ
diff -urN petsc-3.22.0.orig/config/BuildSystem/config/libraries.py petsc-3.22.0/config/BuildSystem/config/libraries.py
--- petsc-3.22.0.orig/config/BuildSystem/config/libraries.py	2024-09-29 09:06:09.000000000 +0500
+++ petsc-3.22.0/config/BuildSystem/config/libraries.py	2024-10-20 15:47:05.265558500 +0500
@@ -641,6 +641,7 @@
       self.logPrint('Using libpthread for the mutex')
       self.pthreadmutex = ['libpthread.a']
       self.addDefine('HAVE_PTHREAD_MUTEX',1)
+      self.setCompilers.LIBS += ' -lpthread'
     else:
       self.logPrint('No pthread mutex support found')
     return
@@ -666,7 +667,7 @@
     self.executeTest(self.checkMathLog2)
     self.executeTest(self.checkRealtime)
     self.executeTest(self.checkDynamic)
-    self.executeTest(self.checkPthreadMutex)
+    if self.argDB['with-pthread']: self.executeTest(self.checkPthreadMutex)
     if not self.argDB['with-batch']:
       self.executeTest(self.checkExecutableExportFlag)
     return
