From 3f6ad348ef80bb1143ac4ee27a7f16a9491f0e23 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 12 Mar 2007 10:10:31 +0100 Subject: [PATCH] Provide the missing S_ISLNK and S_IFLNK macros. Even though the file systems on Windows do not support symbolic links, repositories can still contain information about symbolic links, which is interrogated at many occasions. Without the correct definitions S_ISLNK and S_IFLNK, symbolic link information in the repository is not recognized and treated as corruption. --- git-compat-util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 8d444e8c5a..09bebab73d 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -298,8 +298,8 @@ static inline int prefixcmp(const char *str, const char *prefix) // MinGW #ifndef S_ISLNK -#define S_ISLNK(x) 0 -#define S_IFLNK 0 +#define S_IFLNK 0120000 /* Symbolic link */ +#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK) #endif #ifndef S_ISGRP