1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Revert "Mutex call in x509_crt.c depended on PTHREAD specific instead of generic"

This reverts commit 9eae7aae80.
This commit is contained in:
Manuel Pégourié-Gonnard
2014-02-12 09:29:05 +01:00
parent 2ceda57989
commit 6df09578bb
2 changed files with 3 additions and 4 deletions

View File

@ -952,7 +952,7 @@ int x509_crt_parse_file( x509_crt *chain, const char *path )
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 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
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 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
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