summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/jit.c
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2017-04-12 10:24:56 +0000
committerkrasimir <krasimir@chalmers.se>2017-04-12 10:24:56 +0000
commita8eaa2f2e560547e63c7976960435e1ae23a22b1 (patch)
tree06ce5fd0bc77a16113b5a53118843216fd3c1aea /src/runtime/c/pgf/jit.c
parent915747efa793e53a7b7e9cfd861b4b4a46ace4a4 (diff)
a patch from Bjørnar Luteberget for compatibility with MSVC
Diffstat (limited to 'src/runtime/c/pgf/jit.c')
-rw-r--r--src/runtime/c/pgf/jit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/c/pgf/jit.c b/src/runtime/c/pgf/jit.c
index 4fe18d181..003fa2630 100644
--- a/src/runtime/c/pgf/jit.c
+++ b/src/runtime/c/pgf/jit.c
@@ -5,7 +5,7 @@
#include <pgf/reasoner.h>
#include <pgf/reader.h>
#include "lightning.h"
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(_MSC_VER)
#include <malloc.h>
#endif
@@ -43,7 +43,7 @@ typedef struct {
#define JIT_VSTATE JIT_V1
#define JIT_VCLOS JIT_V2
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) || defined(_MSC_VER)
#include <windows.h>
static int
@@ -71,7 +71,7 @@ pgf_jit_alloc_page(PgfReader* rdr)
#if defined(ANDROID)
if ((page = memalign(page_size, page_size)) == NULL) {
-#elif defined(__MINGW32__)
+#elif defined(__MINGW32__) || defined(_MSC_VER)
if ((page = malloc(page_size)) == NULL) {
#else
if (posix_memalign(&page, page_size, page_size) != 0) {