Merge branch 'sg/git-C-empty-doc'
[gitweb.git] / compat / winansi.c
index a29d34ef44864f02bd89c8490d38bca0efe2a8e6..efc0abcdac43e1c126d6d8148b8a03392e4ae911 100644 (file)
@@ -540,7 +540,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)
 {