]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/SmbiosPlatformDxe: Fix build issue with VS2010
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 1 Apr 2015 08:23:01 +0000 (08:23 +0000)
committerjljusten <jljusten@Edk2>
Wed, 1 Apr 2015 08:23:01 +0000 (08:23 +0000)
VS2010 doesn't accept an unsized array within a structure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17090 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c

index bf7f717a59e8e2a030c7d25a5c5e457ea62eb35e..f70db2ff2b35957fd873452737e71214ac7e092c 100644 (file)
@@ -2,7 +2,7 @@
   This driver installs SMBIOS information for OVMF\r
 \r
   Copyright (c) 2011, Bei Guan <gbtju85@gmail.com>\r
-  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 \r
 #include "SmbiosPlatformDxe.h"\r
 \r
+#define TYPE0_STRINGS \\r
+  "EFI Development Kit II / OVMF\0"     /* Vendor */ \\r
+  "0.0.0\0"                             /* BiosVersion */ \\r
+  "02/06/2015\0"                        /* BiosReleaseDate */\r
 //\r
 // Type definition and contents of the default Type 0 SMBIOS table.\r
 //\r
 #pragma pack(1)\r
 typedef struct {\r
   SMBIOS_TABLE_TYPE0 Base;\r
-  UINT8              Strings[];\r
+  UINT8              Strings[sizeof(TYPE0_STRINGS)];\r
 } OVMF_TYPE0;\r
 #pragma pack()\r
 \r
@@ -56,9 +60,7 @@ STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
     0xFF   // UINT8                     EmbeddedControllerFirmwareMinorRelease\r
   },\r
   // Text strings (unformatted area)\r
-  "EFI Development Kit II / OVMF\0"     // Vendor\r
-  "0.0.0\0"                             // BiosVersion\r
-  "02/06/2015\0"                        // BiosReleaseDate\r
+  TYPE0_STRINGS\r
 };\r
 \r
 \r