From: drh <> Date: Mon, 9 Jun 2025 22:38:34 +0000 (+0000) Subject: Adjustments to ext/misc/fileio.c in an attempt to get it to build using mingw. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f091f423ad89143d8b923080d1c6c9c20550a185;p=thirdparty%2Fsqlite.git Adjustments to ext/misc/fileio.c in an attempt to get it to build using mingw. FossilOrigin-Name: 96b14a3f1193de8f30e9fa704f87558dab8027a218868d32e47688cd5df497b7 --- diff --git a/ext/misc/fileio.c b/ext/misc/fileio.c index 59b7895515..01d9c220fc 100644 --- a/ext/misc/fileio.c +++ b/ext/misc/fileio.c @@ -93,10 +93,11 @@ SQLITE_EXTENSION_INIT1 # include # include # include +# define STRUCT_STAT struct stat #else # include "windirent.h" # include -# define stat _stat +# define STRUCT_STAT struct _stat # define chmod(path,mode) fileio_chmod(path,mode) # define mkdir(path,mode) fileio_mkdir(path) #endif @@ -289,7 +290,7 @@ LPWSTR utf8_to_utf16(const char *z){ */ static void statTimesToUtc( const char *zPath, - struct stat *pStatBuf + STRUCT_STAT *pStatBuf ){ HANDLE hFindFile; WIN32_FIND_DATAW fd; @@ -317,7 +318,7 @@ static void statTimesToUtc( */ static int fileStat( const char *zPath, - struct stat *pStatBuf + STRUCT_STAT *pStatBuf ){ #if defined(_WIN32) sqlite3_int64 sz = strlen(zPath); @@ -341,7 +342,7 @@ static int fileStat( */ static int fileLinkStat( const char *zPath, - struct stat *pStatBuf + STRUCT_STAT *pStatBuf ){ #if defined(_WIN32) return fileStat(zPath, pStatBuf); @@ -374,7 +375,7 @@ static int makeDirectory( int i = 1; while( rc==SQLITE_OK ){ - struct stat sStat; + STRUCT_STAT sStat; int rc2; for(; zCopy[i]!='/' && i