From aa10242a1ffe0306ec8ffe13e10ba9c7b9c522f1 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Fri, 5 Jan 2018 20:08:46 +0000 Subject: [PATCH] Fix shell compilation with MinGW by including the 'dirent.h' header. --- src/shell.c.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/shell.c.in b/src/shell.c.in index eb5f0b42ed..691e7750ad 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -72,7 +72,13 @@ # if !defined(__RTP__) && !defined(_WRS_KERNEL) # include # endif +#endif +#if (!defined(_WIN32) && !defined(WIN32)) || defined(__MINGW_H) # include +# include +# if defined(__MINGW_H) +# define DIRENT dirent +# endif #endif #include #include @@ -875,10 +881,9 @@ static void shellAddSchemaName( #define SQLITE_EXTENSION_INIT1 #define SQLITE_EXTENSION_INIT2(X) (void)(X) -#if defined(_WIN32) || defined(WIN32) +#if defined(_WIN32) && defined(_MSC_VER) INCLUDE test_windirent.c #define dirent DIRENT -#define timespec TIMESPEC #endif INCLUDE ../ext/misc/shathree.c INCLUDE ../ext/misc/fileio.c -- 2.11.4.GIT