Fix compilation windows targets

This commit is contained in:
Hayden Kowalchuk 2018-10-16 01:00:34 -04:00
parent df44c0ea73
commit 0718ab0697
2 changed files with 10 additions and 2 deletions

View File

@ -3,8 +3,12 @@
#include <math.h> #include <math.h>
#ifndef __APPLE__ #ifndef __APPLE__
#include <malloc.h> #if defined(__WIN32__)
/* Linux + Kos define this, OSX does not, so just use malloc there */
#define memalign(x, size) malloc((size))
#else #else
#include <malloc.h>
#endif
/* Linux + Kos define this, OSX does not, so just use malloc there */ /* Linux + Kos define this, OSX does not, so just use malloc there */
#define memalign(x, size) malloc((size)) #define memalign(x, size) malloc((size))
#endif #endif

View File

@ -1,8 +1,12 @@
#include <string.h> #include <string.h>
#ifndef __APPLE__ #ifndef __APPLE__
#include <malloc.h> #if defined(__WIN32__)
/* Linux + Kos define this, OSX does not, so just use malloc there */
#define memalign(x, size) malloc((size))
#else #else
#include <malloc.h>
#endif
/* Linux + Kos define this, OSX does not, so just use malloc there */ /* Linux + Kos define this, OSX does not, so just use malloc there */
#define memalign(x, size) malloc((size)) #define memalign(x, size) malloc((size))
#endif #endif