Fix defines when compiling with -Werror=undef

Some ARM defines fail when compiling with -Werror=undef as they rely on
the missing define mapping to 0.
This commit is contained in:
kudansam 2020-05-22 13:53:09 +01:00 committed by Bartosz Taudul
parent 619523b43e
commit 1151ec1328

View File

@ -28,7 +28,7 @@
# define TRACY_HW_TIMER
#endif
#if !defined TRACY_HW_TIMER || ( __ARM_ARCH >= 6 && !defined CLOCK_MONOTONIC_RAW )
#if !defined TRACY_HW_TIMER || ( defined __ARM_ARCH && __ARM_ARCH >= 6 && !defined CLOCK_MONOTONIC_RAW )
#include <chrono>
#endif
@ -120,9 +120,9 @@ public:
static tracy_force_inline int64_t GetTime()
{
#ifdef TRACY_HW_TIMER
# if TARGET_OS_IOS == 1
# if defined TARGET_OS_IOS && TARGET_OS_IOS == 1
return mach_absolute_time();
# elif __ARM_ARCH >= 6
# elif defined __ARM_ARCH && __ARM_ARCH >= 6
# ifdef CLOCK_MONOTONIC_RAW
struct timespec ts;
clock_gettime( CLOCK_MONOTONIC_RAW, &ts );