Skip to content

Commit ec55677

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 9fee354 commit ec55677

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
@@ -532,7 +532,20 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
532532
#ifdef DETECT_MSYS_TTY
533533

534534
#include <winternl.h>
535+
536+
#if defined(_MSC_VER)
537+
538+
typedef struct _OBJECT_NAME_INFORMATION
539+
{
540+
UNICODE_STRING Name;
541+
WCHAR NameBuffer[0];
542+
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
543+
544+
#define ObjectNameInformation 1
545+
546+
#else
535547
#include <ntstatus.h>
548+
#endif
536549

537550
static void detect_msys_tty(int fd)
538551
{

0 commit comments

Comments
 (0)