Skip to content

Commit 18583f5

Browse files
committed
fixup! Win32: implement readlink()
Let's just fix up the commit that introduces the typedef. This will make for an elegant clean during the next merging rebase. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent f8952c2 commit 18583f5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compat/mingw.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -2162,9 +2162,11 @@ int symlink(const char *target, const char *link)
21622162
return 0;
21632163
}
21642164

2165+
#ifndef _WINNT_H
21652166
/*
2166-
* The REPARSE_DATA_BUFFER structure is only defined in the Windows DDK (in
2167-
* Ntifs.h), so we have to define it ourselves.
2167+
* The REPARSE_DATA_BUFFER structure is defined in the Windows DDK (in
2168+
* ntifs.h) and in MSYS1's winnt.h (which defines _WINNT_H). So define
2169+
* it ourselves if we are on MSYS2 (whose winnt.h defines _WINNT_).
21682170
*/
21692171
typedef struct _REPARSE_DATA_BUFFER {
21702172
DWORD ReparseTag;
@@ -2191,6 +2193,7 @@ typedef struct _REPARSE_DATA_BUFFER {
21912193
} GenericReparseBuffer;
21922194
} DUMMYUNIONNAME;
21932195
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
2196+
#endif
21942197

21952198
int readlink(const char *path, char *buf, size_t bufsiz)
21962199
{

0 commit comments

Comments
 (0)