Skip to content

Commit e4db46c

Browse files
committed
msvc: fix detect_msys_tty()
The ntstatus.h header is only available in MINGW. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 0cbd711 commit e4db46c

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
@@ -528,7 +528,20 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
528528
#ifdef DETECT_MSYS_TTY
529529

530530
#include <winternl.h>
531+
532+
#if defined(_MSC_VER)
533+
534+
typedef struct _OBJECT_NAME_INFORMATION
535+
{
536+
UNICODE_STRING Name;
537+
WCHAR NameBuffer[0];
538+
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
539+
540+
#define ObjectNameInformation 1
541+
542+
#else
531543
#include <ntstatus.h>
544+
#endif
532545

533546
static void detect_msys_tty(int fd)
534547
{

0 commit comments

Comments
 (0)