From e35e9fb4c38d30cce0c2ffe5127c6ecbb5406002 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sat, 18 Jun 2011 13:23:19 +0200 Subject: [PATCH] mingw: Fix compilation --- src/fileops.c | 2 +- src/mingw-compat.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fileops.c b/src/fileops.c index d9c0aa003..c2a3ff0d3 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -720,7 +720,7 @@ int gitfo_readlink__w32(const char *link, char *target, size_t target_len) if (hFile == INVALID_HANDLE_VALUE) return GIT_EOSERR; - dwRet = pGetFinalPath(hFile, target, target_len, VOLUME_NAME_DOS); + dwRet = pGetFinalPath(hFile, target, target_len, 0x0); if (dwRet >= target_len) return GIT_ENOMEM; diff --git a/src/mingw-compat.h b/src/mingw-compat.h index b7919c2e8..64d780b16 100644 --- a/src/mingw-compat.h +++ b/src/mingw-compat.h @@ -8,6 +8,11 @@ # define stat _stati64 # define fstat _fstati64 +/* stat: file mode type testing macros */ +# define _S_IFLNK 0120000 +# define S_IFLNK _S_IFLNK +# define S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK) + #endif #endif /* INCLUDE_mingw_compat__ */