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.
This commit is contained in:
parent
f70a0a996c
commit
899e1fbd94
3 changed files with 25 additions and 17 deletions
|
@ -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 <sys/time.h> // Required for: timespec
|
||||
#include <time.h> // Required for: clock_gettime()
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue