From f0731862d60e2227d3b1f0277f6d810f5e9de297 Mon Sep 17 00:00:00 2001 From: daan Date: Sun, 23 Jun 2019 23:17:44 -0700 Subject: [PATCH] fix compilation on mingw, issue #25 --- src/alloc.c | 1 + src/init.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index 3f9fa0ac..e8543a96 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -405,6 +405,7 @@ char* mi_strndup(const char* s, size_t n) mi_attr_noexcept { #define PATH_MAX MAX_PATH #endif #include +#include char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name) mi_attr_noexcept { // todo: use GetFullPathNameW to allow longer file names char buf[PATH_MAX]; diff --git a/src/init.c b/src/init.c index 3d61a897..62219462 100644 --- a/src/init.c +++ b/src/init.c @@ -385,7 +385,7 @@ static void mi_process_done(void) { #if defined(_WIN32) && defined(MI_SHARED_LIB) // Windows DLL: easy to hook into process_init and thread_done - #include + #include __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) { if (reason==DLL_PROCESS_ATTACH) {