From 0718ab0697fe6ece21e33f820cdcd90c24542784 Mon Sep 17 00:00:00 2001 From: Hayden Kowalchuk Date: Tue, 16 Oct 2018 01:00:34 -0400 Subject: [PATCH] Fix compilation windows targets --- containers/aligned_vector.c | 6 +++++- containers/stack.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/containers/aligned_vector.c b/containers/aligned_vector.c index 60638f6..4f44c92 100644 --- a/containers/aligned_vector.c +++ b/containers/aligned_vector.c @@ -3,8 +3,12 @@ #include #ifndef __APPLE__ -#include +#if defined(__WIN32__) +/* Linux + Kos define this, OSX does not, so just use malloc there */ +#define memalign(x, size) malloc((size)) #else +#include +#endif /* Linux + Kos define this, OSX does not, so just use malloc there */ #define memalign(x, size) malloc((size)) #endif diff --git a/containers/stack.c b/containers/stack.c index ba82b22..8370e24 100644 --- a/containers/stack.c +++ b/containers/stack.c @@ -1,8 +1,12 @@ #include #ifndef __APPLE__ -#include +#if defined(__WIN32__) +/* Linux + Kos define this, OSX does not, so just use malloc there */ +#define memalign(x, size) malloc((size)) #else +#include +#endif /* Linux + Kos define this, OSX does not, so just use malloc there */ #define memalign(x, size) malloc((size)) #endif