[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Avoid redefinition of UTF8_STRING



UTF8_STRING is defined by MSVC 14.23 (_MSC_VER 1923, VisualStudio 16.3)
Use preprocessor to only define UTF8_STRING on earlier compiler
versions. This allows XenIface to build with both EWDK 19h1 18362.84 and
EWDK vb_release 19041.1

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xeniface/wmi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/xeniface/wmi.c b/src/xeniface/wmi.c
index f250429..7cdb20d 100644
--- a/src/xeniface/wmi.c
+++ b/src/xeniface/wmi.c
@@ -228,10 +228,12 @@ USHORT Utf8FromUtf32(CHAR *dest, ULONG utf32) {
     }
 }
 
+#if (_MSC_VER <= 1922)
 typedef struct {
     USHORT Length;
     CHAR Buffer[1];
 } UTF8_STRING;
+#endif
 
 USHORT CountBytesUtf16FromUtf8String(const UTF8_STRING *utf8) {
     ULONG utf32;
-- 
2.16.2.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.