mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 16:55:43 +01:00
Fix check-names.sh fail with USE_GMTIME macro
This commit is contained in:
parent
97f3ecb972
commit
d7177435e3
@ -33,7 +33,7 @@
|
||||
(defined(__APPLE__) && defined(__MACH__)))
|
||||
#include <unistd.h>
|
||||
#if !defined(_POSIX_VERSION)
|
||||
#define MBEDTLS_THREADING_USE_GMTIME
|
||||
#define THREADING_USE_GMTIME
|
||||
#endif /* !_POSIX_VERSION */
|
||||
#endif /* !_WIN32 && (__unix__ || (__APPLE__ && __MACH__)) */
|
||||
|
||||
@ -122,7 +122,7 @@ void mbedtls_threading_set_alt( void (*mutex_init)( mbedtls_threading_mutex_t *
|
||||
#if defined(MBEDTLS_FS_IO)
|
||||
mbedtls_mutex_init( &mbedtls_threading_readdir_mutex );
|
||||
#endif
|
||||
#if defined(MBEDTLS_THREADING_USE_GMTIME)
|
||||
#if defined(THREADING_USE_GMTIME)
|
||||
mbedtls_mutex_init( &mbedtls_threading_gmtime_mutex );
|
||||
#endif
|
||||
}
|
||||
@ -135,7 +135,7 @@ void mbedtls_threading_free_alt( void )
|
||||
#if defined(MBEDTLS_FS_IO)
|
||||
mbedtls_mutex_free( &mbedtls_threading_readdir_mutex );
|
||||
#endif
|
||||
#if defined(MBEDTLS_THREADING_USE_GMTIME)
|
||||
#if defined(THREADING_USE_GMTIME)
|
||||
mbedtls_mutex_free( &mbedtls_threading_gmtime_mutex );
|
||||
#endif
|
||||
}
|
||||
@ -150,7 +150,7 @@ void mbedtls_threading_free_alt( void )
|
||||
#if defined(MBEDTLS_FS_IO)
|
||||
mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex MUTEX_INIT;
|
||||
#endif
|
||||
#if defined(MBEDTLS_THREADING_USE_GMTIME)
|
||||
#if defined(THREADING_USE_GMTIME)
|
||||
mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex MUTEX_INIT;
|
||||
#endif
|
||||
|
||||
|
@ -894,7 +894,7 @@ int mbedtls_x509_key_size_helper( char *buf, size_t buf_size, const char *name )
|
||||
(defined(__APPLE__) && defined(__MACH__)))
|
||||
#include <unistd.h>
|
||||
#if !defined(_POSIX_VERSION)
|
||||
#define MBEDTLS_X509_USE_GMTIME
|
||||
#define X509_USE_GMTIME
|
||||
#endif /* !_POSIX_VERSION */
|
||||
#endif /* !_WIN32 && (__unix__ || (__APPLE__ && __MACH__)) */
|
||||
|
||||
@ -910,10 +910,10 @@ static int x509_get_current_time( mbedtls_x509_time *now )
|
||||
|
||||
(void)tm_buf;
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C) && defined(MBEDTLS_X509_USE_GMTIME)
|
||||
#if defined(MBEDTLS_THREADING_C) && defined(X509_USE_GMTIME)
|
||||
if( mbedtls_mutex_lock( &mbedtls_threading_gmtime_mutex ) != 0 )
|
||||
return( MBEDTLS_ERR_THREADING_MUTEX_ERROR );
|
||||
#endif /* MBEDTLS_THREADING_C && MBEDTLS_X509_USE_GMTIME */
|
||||
#endif /* MBEDTLS_THREADING_C && X509_USE_GMTIME */
|
||||
|
||||
tt = mbedtls_time( NULL );
|
||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||
@ -936,10 +936,10 @@ static int x509_get_current_time( mbedtls_x509_time *now )
|
||||
now->sec = lt->tm_sec;
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C) && defined(MBEDTLS_X509_USE_GMTIME)
|
||||
#if defined(MBEDTLS_THREADING_C) && defined(X509_USE_GMTIME)
|
||||
if( mbedtls_mutex_unlock( &mbedtls_threading_gmtime_mutex ) != 0 )
|
||||
return( MBEDTLS_ERR_THREADING_MUTEX_ERROR );
|
||||
#endif /* MBEDTLS_THREADING_C && MBEDTLS_X509_USE_GMTIME */
|
||||
#endif /* MBEDTLS_THREADING_C && X509_USE_GMTIME */
|
||||
|
||||
return( ret );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user