file: update the file utility to version 5.04.
[msysgit.git] / src / file / patches / 0004-Avoid-using-ELOOP-on-Windows.patch
blobcde47e55a8678b87af727d00020c80f83eb206a8
1 From be03e29d188478dc1b7ccefc5114b6a031ee6949 Mon Sep 17 00:00:00 2001
2 From: Johannes Schindelin <johannes.schindelin@gmx.de>
3 Date: Mon, 7 Dec 2009 17:22:32 +0100
4 Subject: [PATCH 4/6] Avoid using ELOOP on Windows
6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
7 ---
8 src/fsmagic.c | 2 ++
9 1 files changed, 2 insertions(+), 0 deletions(-)
11 diff --git a/src/fsmagic.c b/src/fsmagic.c
12 index 537fb14..a848f15 100644
13 --- a/src/fsmagic.c
14 +++ b/src/fsmagic.c
15 @@ -70,9 +70,11 @@ bad_link(struct magic_set *ms, int err, char *buf)
16 == -1)
17 return -1;
18 else if (!mime) {
19 +#ifndef WIN32
20 if (err == ELOOP)
21 errfmt = "symbolic link in a loop";
22 else
23 +#endif
24 errfmt = "broken symbolic link to `%s'";
25 if (ms->flags & MAGIC_ERROR) {
26 file_error(ms, err, errfmt, buf);
27 --
28 1.7.3