fix wrong target detection
For mingw with `-std=c99`, WIN32 is not defined. Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
484a9e138f
commit
8beb25041e
1 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,8 @@
|
|||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
#include "mbedtls/platform_time.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
|
||||
defined(__MINGW32__) || defined(_WIN64)
|
||||
#include <windows.h>
|
||||
#elif _POSIX_C_SOURCE >= 199309L
|
||||
#include <time.h>
|
||||
|
@ -19,7 +20,8 @@
|
|||
#endif
|
||||
void sleep_ms(int milliseconds)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
|
||||
defined(__MINGW32__) || defined(_WIN64)
|
||||
Sleep(milliseconds);
|
||||
#elif _POSIX_C_SOURCE >= 199309L
|
||||
struct timespec ts;
|
||||
|
|
Loading…
Reference in a new issue