Wrong preproccessor condition fix
Fix for issue #696 Change #if defined(MBEDTLS_THREADING_PTHREAD) to #if defined(MBEDTLS_THREADING_C)
This commit is contained in:
parent
e1b92fee55
commit
85bdcf8c16
2 changed files with 7 additions and 4 deletions
|
@ -1171,13 +1171,13 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
|
|||
if( dir == NULL )
|
||||
return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
|
||||
|
||||
#if defined(MBEDTLS_THREADING_PTHREAD)
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
if( ( ret = mbedtls_mutex_lock( &mbedtls_threading_readdir_mutex ) ) != 0 )
|
||||
{
|
||||
closedir( dir );
|
||||
return( ret );
|
||||
}
|
||||
#endif
|
||||
#endif /* MBEDTLS_THREADING_C */
|
||||
|
||||
while( ( entry = readdir( dir ) ) != NULL )
|
||||
{
|
||||
|
@ -1210,10 +1210,10 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
|
|||
cleanup:
|
||||
closedir( dir );
|
||||
|
||||
#if defined(MBEDTLS_THREADING_PTHREAD)
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
if( mbedtls_mutex_unlock( &mbedtls_threading_readdir_mutex ) != 0 )
|
||||
ret = MBEDTLS_ERR_THREADING_MUTEX_ERROR;
|
||||
#endif
|
||||
#endif /* MBEDTLS_THREADING_C */
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue