From b54fa15ffbb959e97ea0b77bfeb9ae412a63b4e8 Mon Sep 17 00:00:00 2001
From: Eli Zaretskii
Date: Tue, 12 Nov 2024 14:41:01 +0200
Subject: Fix Cygw32 build
* src/pdumper.c (dump_mm_heap_cb_release): Avoid NULL pointer
dereference.
* src/w32dwrite.c (INITGUID) [CYGWIN]: Don't define for Cygwin.
* src/w32menu.c (w32_popup_dialog): Fix Cygw32 build. (Bug#74312)
---
src/w32dwrite.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/w32dwrite.c')
diff --git a/src/w32dwrite.c b/src/w32dwrite.c
index 32e2644af2c..29f9d5f1fed 100644
--- a/src/w32dwrite.c
+++ b/src/w32dwrite.c
@@ -37,7 +37,7 @@ along with GNU Emacs. If not, see . */
#include
#include
-#ifndef MINGW_W64
+#if !defined MINGW_W64 && !defined CYGWIN
# define INITGUID
#endif
#include
@@ -659,7 +659,7 @@ w32_dwrite_encode_char (struct font *font, int c)
if (dwrite_font_face == NULL)
return FONT_INVALID_CODE;
hr = dwrite_font_face->lpVtbl->GetGlyphIndices (dwrite_font_face,
- &c, 1, &index);
+ (UINT32 *) &c, 1, &index);
if (verify_hr (hr, "Failed to GetGlyphIndices"))
{
if (index == 0)
--
cgit v1.2.1