fune/taskcluster/scripts/misc/mingw-enum.patch
Tom Ritter 472f9ff82e Bug 1741428: Add a patch for an enum in MinGW r=firefox-build-system-reviewers,glandium
Forward declarations of enums require a type specifier.
However, in the MinGW headers, the type specifier is missing.

MinGW can't just add it because this header comes from Wine
_and_ is auto-generated by widl.  But widl doesn't support
adding the type specifier.

There's an in-progress patch at
https://github.com/rbernon/wine/compare/wip/upstream...wip/widl/v1.patch
but I can't wait for that to land as the author indicated it's
not being actively pursued.

Differential Revision: https://phabricator.services.mozilla.com/D134235
2021-12-21 18:04:18 +00:00

22 lines
857 B
Diff

diff --git a/mingw-w64-headers/include/windows.foundation.h b/mingw-w64-headers/include/windows.foundation.h
index 423d8fd30..a5a61eb76 100644
--- a/mingw-w64-headers/include/windows.foundation.h
+++ b/mingw-w64-headers/include/windows.foundation.h
@@ -72,7 +72,7 @@ extern "C" {
namespace ABI {
namespace Windows {
namespace Foundation {
- typedef enum PropertyType PropertyType;
+ typedef enum PropertyType : int PropertyType;
}
}
}
@@ -146,7 +146,7 @@ typedef struct __x_ABI_CWindows_CFoundation_CTimeSpan __x_ABI_CWindows_CFoundati
namespace ABI {
namespace Windows {
namespace Foundation {
- enum PropertyType {
+ enum PropertyType : int {
PropertyType_Empty = 0,
PropertyType_UInt8 = 1,
PropertyType_Int16 = 2,