Skip to content

mingw: Fix the MSYS1 build #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2162,9 +2162,11 @@ int symlink(const char *target, const char *link)
return 0;
}

#ifndef _WINNT_H
/*
* The REPARSE_DATA_BUFFER structure is only defined in the Windows DDK (in
* Ntifs.h), so we have to define it ourselves.
* The REPARSE_DATA_BUFFER structure is defined in the Windows DDK (in
* ntifs.h) and in MSYS1's winnt.h (which defines _WINNT_H). So define
* it ourselves if we are on MSYS2 (whose winnt.h defines _WINNT_).
*/
typedef struct _REPARSE_DATA_BUFFER {
DWORD ReparseTag;
Expand All @@ -2191,6 +2193,7 @@ typedef struct _REPARSE_DATA_BUFFER {
} GenericReparseBuffer;
} DUMMYUNIONNAME;
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
#endif

int readlink(const char *path, char *buf, size_t bufsiz)
{
Expand Down