Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-06-20 00:06:05 +0300
committerJunio C Hamano <gitster@pobox.com>2019-06-21 00:03:05 +0300
commit5f3ff7808132a1a4edae9628b0861bd18db9a4d0 (patch)
tree2923c17c804d8beb9ef9ead3989f9369f3bf40db /compat/winansi.c
parentf6f470fed45760a9b1030c29edbaa91167d96adc (diff)
msvc: fix detect_msys_tty()
The ntstatus.h header is only available in MINGW. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/winansi.c')
-rw-r--r--compat/winansi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/winansi.c b/compat/winansi.c
index f4f08237f9..11cd9b82cc 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -544,7 +544,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)
{