Revert "Mutex call in x509_crt.c depended on PTHREAD specific instead of generic"
This reverts commit 9eae7aae80c5e9c7a6b798b3930e00b53c063604.
diff --git a/ChangeLog b/ChangeLog
index 2e2ecb8..fab2154 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,7 +23,6 @@
* ecp_gen_keypair() does more tries to prevent failure because of
statistics
* Fix buf in RSA PKCS#1 v1.5 "reversed" operations
- * Threading in x509_crt depended on PTHREAD instead of generic
* Fixed testing with out-of-source builds using cmake
= PolarSSL 1.3.4 released on 2014-01-27
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 1d81119..4c79a7a 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -952,7 +952,7 @@
return( ret );
}
-#if defined(POLARSSL_THREADING_C)
+#if defined(POLARSSL_THREADING_PTHREAD)
static threading_mutex_t readdir_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
@@ -1020,7 +1020,7 @@
if( dir == NULL)
return( POLARSSL_ERR_X509_FILE_IO_ERROR );
-#if defined(POLARSSL_THREADING_C)
+#if defined(POLARSSL_THREADING_PTHREAD)
if( ( ret = polarssl_mutex_lock( &readdir_mutex ) ) != 0 )
return( ret );
#endif
@@ -1050,7 +1050,7 @@
closedir( dir );
cleanup:
-#if defined(POLARSSL_THREADING_C)
+#if defined(POLARSSL_THREADING_PTHREAD)
if( polarssl_mutex_unlock( &readdir_mutex ) != 0 )
ret = POLARSSL_ERR_THREADING_MUTEX_ERROR;
#endif