mirror of
https://github.com/cuberite/polarssl.git
synced 2025-12-11 00:09:48 -05:00
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
@ -10,7 +10,8 @@
|
|||||||
#if defined(MBEDTLS_HAVE_TIME)
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
#include "mbedtls/platform_time.h"
|
#include "mbedtls/platform_time.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
|
||||||
|
defined(__MINGW32__) || defined(_WIN64)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif _POSIX_C_SOURCE >= 199309L
|
#elif _POSIX_C_SOURCE >= 199309L
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -19,7 +20,8 @@
|
|||||||
#endif
|
#endif
|
||||||
void sleep_ms(int milliseconds)
|
void sleep_ms(int milliseconds)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || \
|
||||||
|
defined(__MINGW32__) || defined(_WIN64)
|
||||||
Sleep(milliseconds);
|
Sleep(milliseconds);
|
||||||
#elif _POSIX_C_SOURCE >= 199309L
|
#elif _POSIX_C_SOURCE >= 199309L
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user