From 14039c1a63f2125490a9808ed0589c67cfc29b7e Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 27 Feb 2013 20:50:40 +0100 Subject: [PATCH] Fixes compilation in Windows. --- mingw.c | 2 -- mingw.h | 3 +++ unix.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mingw.c b/mingw.c index 447a77cf..7f8a0c3b 100644 --- a/mingw.c +++ b/mingw.c @@ -19,8 +19,6 @@ #ifdef __MINGW32__ /* Only for MingW */ -#include "mingw.h" - /* Adds missing Windows declaration */ typedef struct _FILE_ATTRIBUTE_TAG_INFO { DWORD FileAttributes; diff --git a/mingw.h b/mingw.h index b16c8a6e..0a6ca7e0 100644 --- a/mingw.h +++ b/mingw.h @@ -64,6 +64,9 @@ #define symlink windows_symlink #define link windows_link +/* We have nano second support */ +#define STAT_NSEC(st) (st)->st_mtimensec + /** * Generic stat information. */ diff --git a/unix.c b/unix.c index ef7838ec..c4a43183 100644 --- a/unix.c +++ b/unix.c @@ -17,6 +17,8 @@ #include "portable.h" +#ifndef __MINGW32__ /* Only for Unix */ + int open_noatime(const char* file, int flags) { #ifdef O_NOATIME @@ -65,3 +67,5 @@ void os_done(void) { } +#endif +