From c2f285a93f50edc40d6f2b8114e4f9af812398d0 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 12 May 2015 21:51:24 -0400 Subject: More GCC 5 fixes: stdarg.h and other include tweaks, cherry-pick from d51739a4. --- Cryptlib/Include/OpenSslSupport.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Cryptlib/Include') diff --git a/Cryptlib/Include/OpenSslSupport.h b/Cryptlib/Include/OpenSslSupport.h index 9e56ced7..b77838db 100644 --- a/Cryptlib/Include/OpenSslSupport.h +++ b/Cryptlib/Include/OpenSslSupport.h @@ -34,7 +34,7 @@ typedef VOID *FILE; // // Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h // -#if !defined(__CC_ARM) // if va_list is not already defined +#if !defined(__CC_ARM) || defined(_STDARG_H) // if va_list is not already defined /* * These are now unconditionally #defined by GNU_EFI's efistdarg.h, * so we should #undef them here before providing a new definition. @@ -94,7 +94,9 @@ typedef __builtin_va_list VA_LIST; portably, hence it is provided by a Standard C header file. For pre-Standard C compilers, here is a version that usually works (but watch out!): */ +#ifndef offsetof #define offsetof(type, member) ( (int) & ((type*)0) -> member ) +#endif // // Basic types from EFI Application Toolkit required to buiild Open SSL -- cgit v1.2.3