From 4efc8453c232996f3bfb2a83470fa5e14b54d44a Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 2 Dec 2017 15:59:33 -0500 Subject: [PATCH] buildfix for certain mingw environments --- tasks/task_autodetect.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index 4c2b454e3c..66080478f8 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -35,7 +35,15 @@ #if defined(_WIN32) && !defined(_XBOX) && !defined(_MSC_VER) && _WIN32_WINNT >= 0x0500 /* MinGW Win32 HID API */ +#include +#include #include +#ifdef __NO_INLINE__ +/* Workaround MinGW issue where compiling without -O2 (which sets __NO_INLINE__) causes the strsafe functions + * to never be defined (only declared). + */ +#define __CRT_STRSAFE_IMPL +#endif #include #include #include