> This patch seems to miss a similar hunk for <ddraw.h>?

Oh, I missed that. I saw the wine project mentioned in ddraw.h and
planned to send the patch in wine project. But ddraw.h is not actually
imported. Updated patch file attached.
From fc1eb2f28bbfffc1951a634687c04c2d81932eda Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <[email protected]>
Date: Tue, 29 Aug 2023 20:32:08 +0530
Subject: [PATCH] headers: Fix redefinition of DDPIXELFORMAT in ksmedia.h and
 ddraw.h

This fixes the following compiler error.

ddraw.h:773:16: error: redefinition of 'struct _DDPIXELFORMAT'
  773 | typedef struct _DDPIXELFORMAT {
      |                ^~~~~~~~~~~~~~
ksmedia.h:4262:16: note: previous definition of 'struct _DDPIXELFORMAT'
 4262 | typedef struct _DDPIXELFORMAT
      |                ^~~~~~~~~~~~~~

Signed-off-by: Biswapriyo Nath <[email protected]>
---
 mingw-w64-headers/include/ddraw.h   | 3 +++
 mingw-w64-headers/include/ksmedia.h | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/mingw-w64-headers/include/ddraw.h 
b/mingw-w64-headers/include/ddraw.h
index 22ebfa2..8a1771a 100644
--- a/mingw-w64-headers/include/ddraw.h
+++ b/mingw-w64-headers/include/ddraw.h
@@ -770,6 +770,8 @@ typedef struct _DDCOLORKEY
 #define DDCKEYCAPS_SRCOVERLAYYUV               0x00020000
 #define DDCKEYCAPS_NOCOSTOVERLAY               0x00040000
 
+#ifndef _DDPIXELFORMAT_DEFINED
+#define _DDPIXELFORMAT_DEFINED
 typedef struct _DDPIXELFORMAT {
     DWORD      dwSize;                 /* 0: size of structure */
     DWORD      dwFlags;                /* 4: pixel format flags */
@@ -816,6 +818,7 @@ typedef struct _DDPIXELFORMAT {
     } DUMMYUNIONNAME5;
                                        /* 20: next structure */
 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
+#endif /* _DDPIXELFORMAT_DEFINED */
 
 #ifndef MAKEFOURCC
 #define MAKEFOURCC(ch0, ch1, ch2, ch3)  \
diff --git a/mingw-w64-headers/include/ksmedia.h 
b/mingw-w64-headers/include/ksmedia.h
index 2ed9f78..c3f98a5 100644
--- a/mingw-w64-headers/include/ksmedia.h
+++ b/mingw-w64-headers/include/ksmedia.h
@@ -4257,6 +4257,8 @@ typedef struct {
 #ifndef __DDRAW_INCLUDED__
 #define DDPF_FOURCC __MSABI_LONG(0x00000004)
 
+#ifndef _DDPIXELFORMAT_DEFINED
+#define _DDPIXELFORMAT_DEFINED
 typedef struct _DDPIXELFORMAT
 {
   DWORD dwSize;
@@ -4292,6 +4294,8 @@ typedef struct _DDPIXELFORMAT
     DWORD dwYUVZBitMask;
   };
 } DDPIXELFORMAT,*LPDDPIXELFORMAT;
+#endif /* _DDPIXELFORMAT_DEFINED */
+
 #endif /* __DDRAW_INCLUDED__ */
 
 #ifndef __DVP_INCLUDED__
-- 
2.42.0

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to