]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commitdiff
Avoid redefinition of UTF8_STRING
authorOwen Smith <owen.smith@citrix.com>
Tue, 30 Jun 2020 10:44:44 +0000 (11:44 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Wed, 1 Jul 2020 16:05:49 +0000 (17:05 +0100)
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@citrix.com>
src/xeniface/wmi.c

index f250429ab19c2ea5c43bdbfdba0eda885bb26db8..7cdb20dd38573246fa48a79bfa201cf9395ec029 100644 (file)
@@ -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;