Edk2 enables Os option and ms_va_list in GCC tool chain.
This change makes VA_LIST is not pointer, and cause GCC failure.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
\r
*ErrorLevel = DebugInfo->ErrorLevel;\r
\r
-#ifdef __APPLE__\r
+#if defined(__APPLE__) || defined(__GNUC__)\r
// This is non portable C code you can't assume VA_LIST is pointer\r
return FALSE;\r
#else\r
// The first 12 * UINTN bytes of the string are really an \r
// argument stack to support varargs on the Format string.\r
//\r
-#ifdef __APPLE__\r
+#if defined(__APPLE__) || defined(__GNUC__)\r
// This is non portable C code you can't assume VA_LIST is pointer\r
return FALSE;\r
#else\r
// The first 12 * UINTN bytes of the string are really an\r
// argument stack to support varargs on the Format string.\r
//\r
-#ifdef __APPLE__\r
+#if defined(__APPLE__) || defined(__GNUC__)\r
// This is non portable C code you can't assume VA_LIST is pointer\r
return FALSE;\r
#else\r
// The first 12 * UINTN bytes of the string are really an \r
// arguement stack to support varargs on the Format string.\r
//\r
-#if (defined (EFIARM) || defined (EFIAARCH64) || defined (__APPLE__))\r
+#if (defined (EFIARM) || defined (EFIAARCH64) || defined (__APPLE__) || defined (__GNUC__))\r
// It is not legal C code to cast VA_LIST to a pointer. VA_LIST can \r
// be a structure. \r
return FALSE;\r