mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-09 16:15:29 +00:00
Backport 2.1: 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
5ff277ee1e
commit
ee709f4d13
|
@ -5,6 +5,9 @@ mbed TLS ChangeLog (Sorted per branch, date)
|
||||||
Bugfix
|
Bugfix
|
||||||
* Add a check if iv_len is zero, and return an error if it is zero. reported
|
* Add a check if iv_len is zero, and return an error if it is zero. reported
|
||||||
by roberto. #716
|
by roberto. #716
|
||||||
|
* Replace preproccessor condition from #if defined(MBEDTLS_THREADING_PTHREAD)
|
||||||
|
to #if defined(MBEDTLS_THREADING_C) as the library cannot assume they will
|
||||||
|
always be implemented by pthread support. Fix for #696
|
||||||
|
|
||||||
= mbed TLS 2.1.8 branch released 2017-06-21
|
= mbed TLS 2.1.8 branch released 2017-06-21
|
||||||
|
|
||||||
|
|
|
@ -1169,13 +1169,13 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
|
||||||
if( dir == NULL )
|
if( dir == NULL )
|
||||||
return( MBEDTLS_ERR_X509_FILE_IO_ERROR );
|
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 )
|
if( ( ret = mbedtls_mutex_lock( &mbedtls_threading_readdir_mutex ) ) != 0 )
|
||||||
{
|
{
|
||||||
closedir( dir );
|
closedir( dir );
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* MBEDTLS_THREADING_C */
|
||||||
|
|
||||||
while( ( entry = readdir( dir ) ) != NULL )
|
while( ( entry = readdir( dir ) ) != NULL )
|
||||||
{
|
{
|
||||||
|
@ -1202,10 +1202,10 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )
|
||||||
closedir( dir );
|
closedir( dir );
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
#if defined(MBEDTLS_THREADING_PTHREAD)
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
if( mbedtls_mutex_unlock( &mbedtls_threading_readdir_mutex ) != 0 )
|
if( mbedtls_mutex_unlock( &mbedtls_threading_readdir_mutex ) != 0 )
|
||||||
ret = MBEDTLS_ERR_THREADING_MUTEX_ERROR;
|
ret = MBEDTLS_ERR_THREADING_MUTEX_ERROR;
|
||||||
#endif
|
#endif /* MBEDTLS_THREADING_C */
|
||||||
|
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue