diff --git a/src/debug/GdbStub.cpp b/src/debug/GdbStub.cpp index 53101cec..8767dda1 100644 --- a/src/debug/GdbStub.cpp +++ b/src/debug/GdbStub.cpp @@ -14,6 +14,7 @@ #ifndef _WIN32 #include +#include #include #include #include diff --git a/src/fatfs/ffsystem.c b/src/fatfs/ffsystem.c index ebde84a5..0efc6916 100644 --- a/src/fatfs/ffsystem.c +++ b/src/fatfs/ffsystem.c @@ -3,8 +3,13 @@ /* (C)ChaN, 2018 */ /*------------------------------------------------------------------------*/ +#ifdef _WIN32 +/* Windows will not define localtime_r for us unless we explicitly request it + * with macros. */ #define _POSIX_SOURCE #define _POSIX_THREAD_SAFE_FUNCTIONS +#endif + #include #include "ff.h"