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]>
  • Loading branch information
jeffhostetler authored and dscho committed Nov 15, 2018
1 parent 9fee354 commit ec55677
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 @@ -532,7 +532,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 ec55677

Please sign in to comment.