fix non mingw builds

resolves #230
This commit is contained in:
Mario Reder 2020-05-20 16:50:05 +02:00
parent c540712154
commit f99298943c
2 changed files with 3 additions and 1 deletions

View File

@ -31,6 +31,7 @@ typedef double f64;
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <sys/types.h>
#if defined(__MINGW32__) #if defined(__MINGW32__)
#include <_mingw.h> #include <_mingw.h>
#if !defined(__MINGW64_VERSION_MAJOR) #if !defined(__MINGW64_VERSION_MAJOR)

View File

@ -40,6 +40,8 @@
#define MAX_LIGHTS 2 #define MAX_LIGHTS 2
#define MAX_VERTICES 64 #define MAX_VERTICES 64
#define CLOCK_MONOTONIC 0
struct RGBA { struct RGBA {
uint8_t r, g, b, a; uint8_t r, g, b, a;
}; };
@ -159,7 +161,6 @@ static struct GfxRenderingAPI *gfx_rapi;
#include <_mingw.h> #include <_mingw.h>
#if !defined(__MINGW64_VERSION_MAJOR) #if !defined(__MINGW64_VERSION_MAJOR)
#include <windows.h> #include <windows.h>
#define CLOCK_MONOTONIC 0
//https://stackoverflow.com/questions/5404277/porting-clock-gettime-to-windows //https://stackoverflow.com/questions/5404277/porting-clock-gettime-to-windows
struct timespec { long tv_sec; long tv_nsec; }; //header part struct timespec { long tv_sec; long tv_nsec; }; //header part
int clock_gettime(int arg, struct timespec *spec) //C-file part int clock_gettime(int arg, struct timespec *spec) //C-file part