summaryrefslogtreecommitdiff
path: root/compat/winansi.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/winansi.c')
-rw-r--r--compat/winansi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/compat/winansi.c b/compat/winansi.c
index c27b20a79d..936a80a5f0 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -3,6 +3,12 @@
*/
#undef NOGDI
+
+/*
+ * Including the appropriate header file for RtlGenRandom causes MSVC to see a
+ * redefinition of types in an incompatible way when including headers below.
+ */
+#undef HAVE_RTLGENRANDOM
#include "../git-compat-util.h"
#include <wingdi.h>
#include <winreg.h>
@@ -45,8 +51,9 @@ typedef struct _CONSOLE_FONT_INFOEX {
static void warn_if_raster_font(void)
{
DWORD fontFamily = 0;
- DECLARE_PROC_ADDR(kernel32.dll, BOOL, GetCurrentConsoleFontEx,
- HANDLE, BOOL, PCONSOLE_FONT_INFOEX);
+ DECLARE_PROC_ADDR(kernel32.dll, BOOL, WINAPI,
+ GetCurrentConsoleFontEx, HANDLE, BOOL,
+ PCONSOLE_FONT_INFOEX);
/* don't bother if output was ascii only */
if (!non_ascii_used)