mirror of
				https://github.com/Mbed-TLS/mbedtls.git
				synced 2025-11-03 20:33:16 +03:00 
			
		
		
		
	Correct POSIX version check to determine presence of gmtime_r()
Recent versions of POSIX move gmtime_r to the base.
This commit is contained in:
		@@ -112,14 +112,18 @@ extern mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex;
 | 
			
		||||
    defined(__unix) || defined(__unix__) || (defined(__APPLE__) && \
 | 
			
		||||
    defined(__MACH__)))
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#if !defined(_POSIX_VERSION) || 200112L > _POSIX_THREAD_SAFE_FUNCTIONS
 | 
			
		||||
#if !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) ||     \
 | 
			
		||||
       ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) &&                     \
 | 
			
		||||
         _POSIX_THREAD_SAFE_FUNCTIONS >= 20112L ) )
 | 
			
		||||
/*
 | 
			
		||||
 * The preprocessor conditions above are the same as in platform_util.c and
 | 
			
		||||
 * threading.c. Remember to update the code there when changing the conditions
 | 
			
		||||
 * here.
 | 
			
		||||
 */
 | 
			
		||||
extern mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex;
 | 
			
		||||
#endif /* !_POSIX_VERSION || 200112L > _POSIX_THREAD_SAFE_FUNCTIONS */
 | 
			
		||||
#endif /* !( ( defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L ) ||     \
 | 
			
		||||
             ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) &&                     \
 | 
			
		||||
                _POSIX_THREAD_SAFE_FUNCTIONS >= 20112L ) ) */
 | 
			
		||||
#endif /* !_WIN32 && (unix || __unix || __unix__ ||
 | 
			
		||||
        * (__APPLE__ && __MACH__)) */
 | 
			
		||||
#endif /* MBEDTLS_HAVE_TIME_DATE && !MBEDTLS_PLATFORM_GMTIME_R_ALT */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user