Skip to content

Commit

Permalink
msvc: fix detect_msys_tty()
Browse files Browse the repository at this point in the history
The ntstatus.h header is only available in MINGW.

Signed-off-by: Jeff Hostetler <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
jeffhostetler authored and gitster committed Jun 20, 2019
1 parent f6f470f commit 5f3ff78
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions compat/winansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,20 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
#ifdef DETECT_MSYS_TTY

#include <winternl.h>

#if defined(_MSC_VER)

typedef struct _OBJECT_NAME_INFORMATION
{
UNICODE_STRING Name;
WCHAR NameBuffer[0];
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;

#define ObjectNameInformation 1

#else
#include <ntstatus.h>
#endif

static void detect_msys_tty(int fd)
{
Expand Down

0 comments on commit 5f3ff78

Please sign in to comment.