From 899e1fbd94f697d95b9684e272de5410b08edc06 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Wed, 22 Nov 2017 22:47:57 +0100 Subject: Avoid duplicate definition of feature macro Feature macros need to be defined before #including any headers, preferably through the build system, but this is good enough. Fixes a compile error on my fork's Travis CI. --- src/gestures.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gestures.h') diff --git a/src/gestures.h b/src/gestures.h index f4d38dfb..2e343154 100644 --- a/src/gestures.h +++ b/src/gestures.h @@ -148,7 +148,10 @@ float GetGesturePinchAngle(void); // Get gesture pinch ang int __stdcall QueryPerformanceCounter(unsigned long long int *lpPerformanceCount); int __stdcall QueryPerformanceFrequency(unsigned long long int *lpFrequency); #elif defined(__linux__) - #define _POSIX_C_SOURCE 199309L // Required for CLOCK_MONOTONIC if compiled with c99 without gnu ext. + #if _POSIX_C_SOURCE < 199309L + #undef _POSIX_C_SOURCE + #define _POSIX_C_SOURCE 199309L // Required for CLOCK_MONOTONIC if compiled with c99 without gnu ext. + #endif #include // Required for: timespec #include // Required for: clock_gettime() #endif -- cgit v1.2.3