summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorMichael Vetter <[email protected]>2017-06-11 11:20:30 +0200
committerMichael Vetter <[email protected]>2017-06-11 11:20:30 +0200
commit272073785f17f9b202a5b2a62265bbbd2940b07e (patch)
tree6fc7fa1e38e0e5c22dd03c5fb14bf335925501b5 /src/core.c
parentb6d7fa9bb0775023a974a03e7919203a3f757a01 (diff)
downloadraylib-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/core.c')
-rw-r--r--src/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 95f704d1..f2ecfa04 100644
--- a/src/core.c
+++ b/src/core.c
@@ -109,6 +109,10 @@
#include "external/gif.h" // Support GIF recording
#endif
+#if defined(__linux__) || defined(PLATFORM_WEB)
+ #define _POSIX_C_SOURCE 199309L // Required for CLOCK_MONOTONIC if compiled with c99 without gnu ext.
+#endif
+
#include <stdio.h> // Standard input / output lib
#include <stdlib.h> // Required for: malloc(), free(), rand(), atexit()
#include <stdint.h> // Required for: typedef unsigned long long int uint64_t, used by hi-res timer