Skip to content

Commit 362286a

Browse files
jeffhostetlerdscho
authored andcommitted
msvc: fix detect_msys_tty()
The ntstatus.h header is only available in MINGW. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 370bf48 commit 362286a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

compat/winansi.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,20 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
544544
#ifdef DETECT_MSYS_TTY
545545

546546
#include <winternl.h>
547+
548+
#if defined(_MSC_VER)
549+
550+
typedef struct _OBJECT_NAME_INFORMATION
551+
{
552+
UNICODE_STRING Name;
553+
WCHAR NameBuffer[0];
554+
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
555+
556+
#define ObjectNameInformation 1
557+
558+
#else
547559
#include <ntstatus.h>
560+
#endif
548561

549562
static void detect_msys_tty(int fd)
550563
{

0 commit comments

Comments
 (0)