diff options
| author | Michael Vetter <[email protected]> | 2017-06-11 11:20:30 +0200 |
|---|---|---|
| committer | Michael Vetter <[email protected]> | 2017-06-11 11:20:30 +0200 |
| commit | 272073785f17f9b202a5b2a62265bbbd2940b07e (patch) | |
| tree | 6fc7fa1e38e0e5c22dd03c5fb14bf335925501b5 /src/physac.h | |
| parent | b6d7fa9bb0775023a974a03e7919203a3f757a01 (diff) | |
| download | raylib-272073785f17f9b202a5b2a62265bbbd2940b07e.tar.gz raylib-272073785f17f9b202a5b2a62265bbbd2940b07e.zip | |
Add define to have CLOCK_MONOTONIC work in c99
If we compile with c99 without gnu extensions (gnu99) we need this
define, to have CLOCK_MONOTONIC and similar macros available
Diffstat (limited to 'src/physac.h')
| -rw-r--r-- | src/physac.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/physac.h b/src/physac.h index d3fdaca4..8c109935 100644 --- a/src/physac.h +++ b/src/physac.h @@ -253,6 +253,7 @@ PHYSACDEF void ClosePhysics(void); int __stdcall QueryPerformanceCounter(unsigned long long int *lpPerformanceCount); int __stdcall QueryPerformanceFrequency(unsigned long long int *lpFrequency); #elif defined(__linux__) || defined(PLATFORM_WEB) + #define _POSIX_C_SOURCE 199309L // Required for CLOCK_MONOTONIC if compiled with c99 without gnu ext. //#define _DEFAULT_SOURCE // Enables BSD function definitions and C99 POSIX compliance #include <sys/time.h> // Required for: timespec #include <time.h> // Required for: clock_gettime() |
